views:

149

answers:

2

I'm using rvm (Ruby Version Manager) and running Rails 3 RC. I need to test an app to see if a bug has been resolved with a recent commit to Rails 3 master on GitHub.

How do I install Rails 3 master from GitHub and then generate a new app?

I can't use gem install rails --pre because I want the edge version, not the release candidate.

Can you suggest a helpful gist or blog post?

All I could find was this: http://weblog.rubyonrails.org/2010/1/1/getting-a-new-app-running-on-edge and it is out-of-date.

Thanks!

A: 

Why not take a look through the commit log here: http://github.com/rails/rails/commits/master before cloning the repository? I don't know what bug you are looking for but remember, you can also look at the "diffs" from each commit to see what has changed.

Ninefingers
@Ninefingers, thanks for making the suggestion. I've actually been watching the commit log and saw a commit that looks like it fixes a problem I've had. So was looking for a way to install edge Rails to test it. Your suggestion is good though, and anyone should start with the repo commit log.
Fortuity
+3  A: 

You can do this with your rails 3 app Gemfile. Bundler is able to install directly from github and if you dont specify a branch or tag then it will use master. Add this to your Gemfile after you generate your rails 3 app, and then run bundle install and start up your app. After you bundle install it will show you the commit number in Gemfile.lock.. it should be the latest commit number from the master rails repo. Here is what I do in my Gemfile:

gem 'rails', :git => 'git://github.com/rails/rails.git' 
#gem 'rails', '3.0.0.rc'

I just uncomment and comment these 2 lines to switch b/w RC and master... and bundle install.

Alternately, you can clone the repo and then use your local source in the Gemfile:

I think it should look something like this (untested):

gem 'rails', :require => 'rails', :path => "/path_to/rails"
cowboycoded
also, if you are wanting to debug the rails source without cloning, you can run "bundle show rails" after you bundle install with using rails from github, and it will show you the location that Bundler installed the rails source.
cowboycoded
@cowboycoded, thanks so much! Your answer (plus the additional comment) is very helpful. Bundler is a blessing!
Fortuity