Oscar Del Ben Rails & Iphone development

How to Install Rails 3

Curious to take a look at Rails 3?

Update: There’s now an official gem for working with Rails 3 beta. I’ve updated the instructions to use that gem.

$ sudo gem install tzinfo builder memcache-client rack rack-test erubis mail text-format bundler thor i18n
$ sudo gem install rack-mount --version=0.4.0
$ sudo gem install rails --pre
$ rails -v
  Rails 3.0.0.beta

Note: you can ignore eventual documentation errors while building those gems. Also note that we need to specify the version for rack-mount, because the latest version is not yet supported.

Now you are ready to begin playing with Rails 3

$ rails myproject
$ cd myproject
$ rails generate scaffold Post title:string body:text
$ rake db:migrate
$ rails server

Go to http://localhost:3000/posts and add your first post!

Note: if you see an error like undefined method 'from' for Arel, just uninstall the arel gem and reinstall it again

rails 3

Here you can find some resources to get started with Rails 3.

Just remember that Rails 3 is still unstable and should not be used for any purpose outside testing what’s new.

Posted on 06 December 2009
Filed under Rails