Sunday, February 2, 2014

Install Rails 4 with RVM and Ruby 2.1.0 on Ubuntu 13.10

I noticed Ruby 2.1 wasn't available for Ubuntu 13.10 yet, so I decided to post this really fast set of install steps on how I did this.

It will have to build from source, so first make sure you have everything you need and are up to date.

In your shell:

sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev

For RVM:

sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev

curl -L https://get.rvm.io | bash -s stable



RVM tells you type this when you are done:

source ~/.rvm/scripts/rvm

You might have to add that to your .bashrc if this is your first time installing this. I did not there was an entry in my .bashrc already.

Now when I check my ruby version:

ruby -v
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]


And my gem version:

gem -v
2.2.1


If you don't want to store the documentation for each gem package locally:

echo "gem: --no-ri --no-rdoc" > ~/.gemrc

I'm going to install node.js as well to support Coffeescript:
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
The last line after this install for me says:

Setting up nodejs (0.10.25-1chl1~saucy1) ...

Rails installs a lot of gems, so this could take a little while depending on your computer.

To install rails:

gem install rails

Now check the version:
rails -v
Rails 4.0.2


At this point you are done. You can use Rails with sqlite3. I personally don't do that because I use mysql, which I already have installed. But just in case you don't and you would want Mysql here are the instructions. If you have mysql but not the dev library you should run this line anyway, so you can compile the mysql2 gem.

Install mysql:

sudo apt-get install mysql-server mysql-client libmysqlclient-dev

This is optional but gets workbench v 5.2.47 which I am fine with. There is a 6.x version on the mysql website.
sudo apt-get install mysql-workbench

No compile the mysql2 gem. This isn't required here, but will make it easier to check your on track:

gem install mysql2

Now create your new app:
rails new yourappname -d mysql

You have mysql based rail application at this point. If you are really new to rails, you want to know to do these couple of things:

cd yourappname
Modify the config/database.yml for username and password
rake db:create
rails server
Your application is now running on http://localhost:3000

Without comments and shrinking the steps down to be even shorter, I think it could look something like this:

sudo add-apt-repository ppa:chris-lea/node.js

sudo apt-get update

sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libgdbm-dev libncurses5-dev automake libtool bison libffi-dev nodejs mysql-server mysql-client libmysqlclient-dev mysql-server mysql-client libmysqlclient-dev

curl -L https://get.rvm.io | bash -s stable

source ~/.rvm/scripts/rvm

echo "gem: --no-ri --no-rdoc" > ~/.gemrc

gem install rails

rails new yourappname -d mysql

cd yourappname

Modify the config/database.yml for username and password

rake db:create

rails server

done

Saturday, July 7, 2012

Mint 13 with XFCE, pretty darn nice

I'm a long time Ubuntu fan, but 12.04 had me concerned.  I just don't like the new UI.  I'm sure its great for a thousand reasons, but I don't like it.  I'm still on 10.04 with XFCE and Compiz effects.  It was my dream UI, customized the way I like it.  But now 10.04 is getting retired and I need to move on.  Since Ubuntu 12.04 no longer looked like a great option with the defaults, I have started to try some other installs.  I installed 12.04 standard which had some issues right away.  They seem to be going away with updates, but I'm not totally ready to make the switch.  Several times I was forced to stop working and send in crash reports.
I swapped out unity and tried enlightenment, which I have always liked the idea of, but just can't commit to.  The project is always interesting to me, with the right goals and ideas, but somehow, I just can't make it work for the way I want to work.  Then I tried Cinnamon, which has some real promise.  I'm not sure what I quite didn't like about it, other than it just didn't feel like home.  I might get used to it.  I was looking for a little more Compiz out of it.  Some easier ways to switch desktops and some cool effects.  I also wanted my standard right click get all my applications and I haven't quite found that yet.  I also don't have a doc with it, to replace my old conky dock.  I setup a floating panel, but its sort of a nuisance.  Concky floats out of the way when I'm trying to use the space and is generally pretty nice.  I'll keep that install as a dual boot option for a while to see if I like it.  I also tried XFCE on Ubuntu 12.04.  It was just fine.  I think I could play with getting some sort of Compiz features installed and make it fun, and it could work.  The problem was really the 12.04 crashes.  I haven't figured out the root cause of that so I decided to try something new.
I booted Mint 13 with XFCE RC on old computer, where I am typing this now.  The process was really painless.  I also installed it as a VM on my mac with 2gb of ram.  That install went easily as well. I can't say I have to many hours of use in with yet, but no crashes.  That seems odd since its based on Ubuntu 12.04, so I expected the same issues.  The odd thing too is that XFCE 4 looks so different to me from my version on Ubuntu 10.04, that I have a hard time recognizing it.  It has my trusty right click applications menu and the XFCE settings manager.  Its running quite fast as well considering I'm trying this on an Intel Pentium M with 500meg of ram laptop.  Go lenovo, Thinkpad.  This thing should be buried by now, but its very usable so far.  We will see how it goes, but it looks pretty darn good so far.

Sunday, July 1, 2012

Android tablet market needs help

In the last three months the table market has seen a lot of headlines from the Adnroid tablets will take over iPad sales to "Is the Adroid tablet dead".  Both of those were from Forbes in nearly a two month period.  I own and Acer tablet and we have an iPad in the house as well.  My Acer tablet is my Android product but otherwise I'm Apple owner in general and I'm a Linux user at heart.  I think Google releasing so many products has apparently not understood the Tablet market very well, or just not made it a priority.  That is also seen by their latest OS release which hardly does anything good for the tablet, and focuses their efforts on winning the phone war with Apple and now Microsoft.  But there are things Google can do to really attack the tablet market and not just hand it over to Amazon and Apple.

Amazon has nearly 50% (depends on time you count the numbers) of the Android tablet market.  The strategy could be a great one if you make money selling content, which Amazon does, but they sell these tablets at a loss.  So if you are an OEM tablet manufacture this approach isn't going to work for you.  It makes hard to enter the sub $200 market.  And Amazon has heavily discounted content to get people using the content service.  Google's answer is the Nexus 7 built by Asus.  The good news is that Google is vested in getting this right and Asus is a good partner.  Google also has beefed up their media & content.  The bad is that this could easily develop into a price war on hardware and content with Amazon leaving no margin for either player and killing all other entrants.  Its also does nothing to attack Apple's position as the superior experience in the market.  The Nexus is small and doesn't have many of the open features that other Android tablets have, like HDMI out and a superior display.  So the bottom end of the market is now taken by Google and Amazon (maybe some Nook) serving people who want to surf, read and watch show on something bigger than their phone.  At this price point consumers could easily own a laptop, a gaming console as well as a smart phone.

The iPad is competing not only for the media market but its taking laptop sales.  For people who don't want the extra laptop and are not hard core PC gamers, the iPad fits the bill.  The competitor in terms of sales volume in this space is only Samsung.  I like my Acer, but it just doesn't have the sales the Samsung Galaxy Tab has.  Here is what I think Google, Android, and the OEM's need to do to make a dent in this space.

  1. The OS just needs to stop crashing.  Stability is an issue.  Its all over the web, so the denials just aren't worth listening too.  Make it work.
  2. A great feature of tablets are their larger size, but at this time, most apps are still scaled phone apps.  I know iPad had this too and Apps aren't made by Google, but.. and oh wait Apps are made by Google, so at least make those Tablet size with improved features.  Because the Apple apps are improved.  Demonstrate to the market what can be done.
  3. Store apps on the SDCard.  I have 12Gig of memory and I'm out of space.  My son has the acer too, and he is out space.  It doesn't take long.  Even if the Data for the apps could be on the SD Card it would make a big difference.  The SDCard is nice, but not really worth having with out this, and so there is no advantage over iPad.  With this working, its a selling point to compete head to head.
  4. Keep the open hardware features.  The Nexus 7 has a mini usb and no HDMI.  But that was a great selling point over iPad.  I plug my Acer into an HDMI video source add a keyboard and its like desktop on the go.  No more full laptop when flying, no hassle at the airport and the full keyboard and normal screen is great.  With a VNC or variant, I'm connect to my computer and work on that.  Its a great mobile option.
  5. Smart Multitasking - If I'm playing a game, don't start auto updates and certainly don't stop my game to tell me.  Yes, I can turn off auto updates, and stop the messages.  I want smart updates, if I'm doing something, its not the right time.  But there is plenty of time my Tablet is doing anything, or I'm just surfing.  Update then.  But don't interrupt my Netflix or Hulu with that stuff.    
  6. Mobile Gaming.  Acer supports some real gaming options.  These are FPS shooters with great graphics and game play.  One reason the space is an issue, they have a lot of data.  This a great segment for Acer.  My teen son loves it.  Its a mobile game platform, when it works.  Plug hdmi into the TV, add a PS3 controller and its great affordable and portable game play.  The problem is limited game controller support.  I understand that part of this is the game maker, but Android could make controllers easier to support by building that into Android.  The problem is stability again.  Who wants to start the game over after the crash?  The multitasking updates take away from the experience as well.  In this area, the Acer kills the iPad.
  7. Content - Apple has more and Amazon has more - at least according to their users.  I know Google recently reported having more content, but it needs to be a market reality to mean something.
  8. DLNA - Support of this open standard in an ongoing way makes the device attractive.  At the time, I can really only send my music to my PS3.  Could be because I don't know better, but helping wireless connect to devices in the house and compete in an Open way against Apple is a winning strategy.  AppleTv doesn't have the market penetration of XBox and PS3 as the Tv connector of the future.  My Xbox is even a Cable box with AT&T, so why not stream my music too it, connected to my stereo.  I don't have to buy yet another product.
  9. Price - The Android has to be cheaper and better.  Trying to cost the same as the iPad, and I just buy an iPad.  For a while, Android is going to need to win on price.  There needs to be a reason to risk using it.  OEM relationships work when a higher quality product can be delivered at a cheaper price because each partner can specialize in what it does.  Single source engineering works when the over quality and experience needs to be controlled by single source to ensure a superior product.  What wins changes over time.  For the last few years this has favored Apple and not Microsoft and Google.  Google needs to make this work if Android is going to work.
  10. Third party hardware support - DLNA and open hardware connectors sort of get you there, but there are just more third party add on products that make it easier to do stuff with the iPad.  Of course the OEM strategy makes it difficult to make this happen on a mass scale.  Apple would win this one for a while, but now they are reportedly changing their standard connector which could cause the market a lot of pain and be a positive selling point for the standard approach of Android talbets.
  11. Jelly Bean doesn't get you there on the tablet.  I don't care about the better camera on my tablet.  Most of the features in this minor release have no benefits to tablets.  Changing the user interface again is not the problem.  Crashing is, multitasking that brings the system to a halt is a problem.  So while new features are exciting for a minor release, lets get things working smooth.  This release doesn't really address anything I talked about here.  There needs to be a release that is stable and has features people with Tablets want, not just phone improvements.
See something you think would help Android in the tablet market, let me know.



Thursday, September 8, 2011

Training just not blogging

I have continued to train, but just haven't had time to blog. The days are pretty full when you train twice a day and work. That should let up now that we are closing in on race day. I have a few more days of doubles, and then I'll ease up on everything to get rested and try not to gain to much weight.
I was doing good on weight, but Labor just killed me. I gain 6lbs that weekend. I don't know how anyone could eat that much, but I did it. It took 2 months to loose that weight and two days to get it all back. Since then I've dropped a 2lbs out that, so water, etc. But really disappointing. Either way, I feel faster and ready to go.

Bionic vs iPhone 3gs Speedtest - Verizon vs ATT

The Bionic looks impressive so far. I got to speedtest one against my AT&T 3GS and I was shocked. To get right to it, Speedtest on the Bionic 7Meg download, AT&T iphone 3GS, only 3.4Meg. The Verizon network just killed AT&T. And it was off the same speedtest server. I tried the same test using my corporate wifi with my phone and did get 11meg. I just wanted to make sure the phone could go that fast.
That said, I watch Netflix on my phone at 3.4M, so what else do I need to do? I skype out and video chat all with good quality. My web pages and apps load fine, so how fast do I really need to go. Twice as fast sounds impressive, but the movie will play at the same speed. I'll be interested to watch and see what people really use that bandwidth for.

Tuesday, July 26, 2011

PS3 - Doesn't recognize external hard drive formatted in FAT32

I searched everywhere on the internet.. clearly not enough, for my hard drive wasn't recognized by my PS3. The most common issue was not being in FAT32 format. Which everyone says every modern OS supports, but clearly they do not support it enough, because the most common response to formatting the drive was to buy new windows software.
I tried many approaches that did not work, but maybe they did and I didn't know it, its still not clear why my eventual solution did work. After trying to format on Linux, Windows vista, Windows 7 and even putting the drive in the PS3 and then back in the USB, plugging it into the PS3, it was still not recognized.
I connect the drive to my Mac and formatted it in FAT filesystem. In 10.6 it doesn't say FAT32 but it is. Don't try exFAT either, that doesn't work. Then I created some folders, based on this article. I plugged it in and it was instantly recognized. I'm not sure if the Mac got the formatting right, or it was the folders. It seems hard to believe the PS3 couldn't get the formatting right.
Not a single article in the dozens I read said anything about making these folders to do a backup before swapping out a drive, or trying to get an external drive to work. Everyone seemed to format in FAT32 and it just worked. If you think your drive is in the proper FAT32 and it still isn't being recognized, you might give the folders a try.

Mac Battery - Replace Now - Then good??

After my upgrade to Snow leopard my battery suddenly died for good. Lots of suspicion on the internet about why that happens. I'm sure Apple didn't want to up the stock price or anything more accessory sales, but who knows. I needed a new battery so I braved the Mac Store at lunch time no less, stupid, but I did it. It was packed. The mall was empty, it was packed. I snagged a geek and in drive by, rude, interrupting question and found what I needed. Seamless check out from another geek and I was on my way. On the way out I realized they were actually having a camp for kids there, teaching kids to make videos. Who knew. I was just happy to escape in less than 20 mins. I get the battery home, swap out the old one and boot up. Then the anger sets in when its says replace now on my battery status. I finished the charge and still no luck. Before scheduling time with the geek I did a reboot, and it appears to be fully functional. Hopefully that continues to be the case. Many people online complained the new battery only lasted about a year. My first battery lasted 5 years, before snow leopard killed in a week.