Wednesday, May 4, 2011

How to install SQLite3 on Fedora


First install the libraries using yum :

# sudo yum install sqlite-devel
# sudo yum install ruby-devel

Then, just install the sqlite3 gem :

sudo gem install sqlite3-ruby

That's it.

Sunday, May 1, 2011

How to upgrade to Rails 3 on Mac manuallly

I've done the process described bellow totally by hand. I'm sure that there is a better method out there, however that one worked for me.

Pre-reqs
You will have to have XCode installed in your Mac.

Update the Ruby
I've download the Ruby source code from :
http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p180.tar.gz

Untar the binary

tar -xvf ruby-1.9.2-p180.tar.gz

Let's configure, make and make install ruby
that will install 1.9.2 in your Mac.


cd ruby-1.9.2-p180
./configure
make
make install



If you don't see any errors t you should see the new version on your Mac:

ruby -v


Let's install gem.. Ok, for each Ruby installation there is a exclusive gem installation for it.
So, even though you've done the ruby update you will still see that gem is using the old Ruby 1.8.7.
So, let's start installing gem
Download the source:

http://rubyforge.org/frs/download.php/74619/rubygems-1.7.2.tgz

# cd rubygems-1.7.2
ruby setup.rb


Now, let's remove the old gem...(As a good practice..take a backup first, we never know..)
On my Mac gem was in /usr/bin/gem

mv /usr/bin/gem /usr/bin/bk_gem.old

Let's link the new version

ln -s /usr/local/bin/gem gem

Now you should see the new gem version:
gem -v 1.7.2

Now, go ahead and install Rails 3.0
gem install rails

One last thing..update rake as well :


sudo mv /usr/bin/rake /usr/bin/rake.old
$ cd /usr/bin
$ sudo ln -s /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/bin/rake rake


That's it.. You've done the upgrade to Rails3 manually.