Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

Rails 3.0 Beta/Prerelease Available Now and How To Install It

By Peter Cooper / February 5, 2010

rails-3-logo.pngToday, Rails core member Jeremy Kemper dropped the words that lots of ardent Rails developers have been waiting for: "Rails 3 beta is LIVE." It's true! Rails 3.0's first approved beta/pre-release version is now live and ready for you to install.

rails3betalive.png

Unfortunately, the installation process isn't as easy as Jeremy explains. RubyGems doesn't support the installation of prerequisites on pre-release gems, so you need to install them all manually. I think I have some instructions to cover that (works on 1.8.7 and 1.9.1):

gem install i18n tzinfo builder memcache-client rack rack-test rack-mount erubis mail text-format thor bundler
# remember to prefix with "sudo" if your environment needs that

And then, finally:

gem install rails --pre

Worth reading next is a retrospective and summary of the work done for Rails 3.0 so far by Yehuda Katz.

[news] @peterc here! My next "big thing" is a new site called coder.io. If you're into technologies like Ruby, Git, Python, the iPhone, MySQL, JavaScript, Clojure, etc, you might want to get on the coming soon list for some eventual freebies/bonuses along with exclusive early access. Thanks!

Comments

  1. Caius Durling says:

    Cheers for that.

  2. Peter Cooper says:

    Just had to update it a little.. added i18n. Now tested on 1.8.7 and 1.9.1.

  3. Peter Cooper says:

    Before anyone bitches, I beat DHH's post on the official blog by 4 minutes here, so I didn't rip it off ;-)

  4. Karmen Blake says:

    I had to install i18n gem too, just in case anyone else needed to know.

  5. Peter Cooper says:

    Amusingly, the official blog post had the same missing i18n entry that I missed and similarly fixed it *g* Ha!

  6. Sam says:

    I'm running rails 2.3.5 with no problems but everytime I try to upgrade to the 3 beta and check the rails version I get this error :-

    /usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:384:in `bin_path': can't find executable rails for rails-3.0.0.beta (Gem::Exception)
    from :345:in `method_missing'
    from /usr/local/bin/rails:19:in `'

    Works fine if I revert back to version 2.3.5. Anyone know whats happening?

  7. Joc says:

    Hmm, anyone else having problems installing text-format on Leopard?

    I'm getting

    /Users/joc/.rvm/ruby-1.8.7-p248/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:245: [BUG] Segmentation fault
    ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-darwin9.8.0]

    Abort trap

    Any ideas?

  8. Sam says:

    Ok, worked it out, had a problem with rubygems. Now to upgrade my latest project so I can start using it in all its goodness :D Keep up the great blog.

  9. grigio says:

    I installed it but it is unusable :(

    http://gist.github.com/295790

  10. Paul says:

    If you're using a fresh 1.9.1 installation, RubyGems and Rake are included, but are not the supported version. Do the following:

    sudo gem update --system
    sudo gem install rake

    Then the rest of the instructions work.

  11. Joc says:

    In case anyone else gets the same problem I had above.

    gem cleanup

    seemed to clear everything out and i was then able to install text-format and then 3 beta

  12. colin says:

    @Sam, could you please fill us in on what you did with rubygems to skirt the "can't find executable" issue?

    Much appreciated.

  13. Ed Brannin says:

    I'm also having the same problem as @Sam and @colin.

  14. Leigh says:

    @Sam, yes please sam as per Colin request, I'm having the same problem.

  15. Peter Cooper says:

    Y'all running at least Ruby 1.8.7 and the latest RubyGems?

  16. Chris Moos says:

    @Leigh, @colin: I had the same bin_path problem, I deleted my ~/.gem folder, and then it was fine after. Go figure.

  17. Justin Zollars says:

    @Sam, how did you fix that bug? I have the same problem on my system.

  18. Ed Brannin says:

    @Peter Cooper: Yes, "gem update --system" didn't do anything.

    My Ruby version: ruby 1.8.7 (2008-06-20 patchlevel 22) [i686-darwin9.3.0]

  19. Ed Brannin says:

    I upgraded Ruby to the latest version in Macports (and for the first time since upgrading to Snow Leopard), and now rails 3.0.0.beta works:

    ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-darwin10]

  20. Paul Siegmann says:

    @Leigh, @Colin Finally doing this:
    gem install railties --pre
    Fixed it for me.

  21. ken foust says:

    help whats up with this

    rake aborted!
    uninitialized constant MysqlCompat::MysqlRes

    thanks

  22. Adam Fortuna says:

    Thanks Paul, I was having the same problem and "gem install railties --pre" solved it for me.

  23. ken foust says:

    also when I look in the rails-3.0.0.beta directory the only thing in there is .require_paths

    Have I screwed up somewhere?

    I have also updated ruby 1.9.1 and that is fine
    the rest of the beta gems are there
    using snow leopard and installing in /usr/local

  24. Vincent says:

    Here is what I did:

    Installed bundler on system ruby (1.8.7)

    Did a clean rvm install, installed ruby 1.9.1, clean rails install using these 2 lines (also had to do gem install sqlite3-ruby because bundle pack wouldn't work otherwise)

    Every time I do rails server or rails script it spews a whole lot of gemspec info. Made a gist of it. http://gist.github.com/297415

    The funny thing is that everything works ... it just doesn't work very nicely.

  25. Vincent says:

    nevermind ... this is an issue with ruby 1.9.1 & rubygems. thx for the writeup.

  26. andres says:

    for some reason, after fiddling with bundler my rails-3.0.0.beta directory was empty, and had to re-install to populate it,

    For generating the doc API (rake doc:rails),
    I had to symlink vendor/gems/gems to /usr/lib/ruby/gems/1.8/gems/
    (yep, I couldn't figure it out with bundler)
    so rake doesn't choke,
    also touch railties-3.0.0.beta/MIT-LICENSE
    because it's not there,

  27. Craig says:

    I needed to install bundler

    The latest rack-mount (0.5.0) is too new, it requires 0.4.x so I specified 0.4.0. ( sudo gem install rack-mount --version=0.4.0 )

    I didn't need to install railties though to make the install work.

    The error I got on my first attempt was:

    ERROR: Error installing rails:
    actionpack requires rack-mount (~> 0.4.0, runtime)

    I'd never seen the '~>' syntax before, despite using ruby for over 3 years -- I found it meant that exact branch (0.4.x), and not a higher one (which I had just installed [0.5.0]).

    I found that at:
    https://rails.lighthouseapp.com/projects/8994/tickets/3918

    Cheers!
    -- Craig

  28. ken foust says:

    andres I am having the same problem but when I reinstalled I still have a empty directory but the strange thing is that I am doing a tutorial with rails 3 and it works???????

    on mac osx snow leopard
    any idea how to install properly??

    gracias

  29. pjammer says:

    Paul Siegmann, comment #20 fixed the same problem SAM didn't really elude to... leave a blog next time dude.

    I also, updated my gems as per Peter's suggestion, then when that didn't work i deleted .gems as Chris Moos said in #16, but that didn't work, so i tried SAM's suggestion.

    Enjoy.

  30. paschelino says:

    -> the missing binary file issue

    the manual installation of railties beta fixed it for me too.
    (ubuntu 9.04)

    command:
    sudo gem install railties --pre

  31. Peter Cooper says:

    rwerewrwe

Other Posts to Enjoy

Twitter Mentions