Reputation: 41442
Let's say I want to add some new features to Rails. According to the Rails Guide on how to contribute to Rails, I should clone the main repository, create a branch, then make my changes in that branch.
My question is: after I've done all of that, how do I go about testing my changes in an actual Rails application? That is, how do I get a Rails application running on my machine to use the Rails code from my branch rather than the Rails code installed on my system?
The simplest approach I can think of is to simply replace the "rails" folder in my gems folder with the code from my branch, but it seems like there should be a cleaner way to do this.
Upvotes: 2
Views: 181
Reputation: 875
If you change the minor revision number and install it in your gems folder you can specify that new version when you create a new app
rails _3.0.x_ new newappname
Upvotes: 0
Reputation: 1965
If you're using bundler, just point to your modified version in your Gemfile by specifying either the path of the gem on the filesystem or your forked git repo. Like this:
gem 'rails', :path => '/full/path/to/mofidied/rails'
or for git:
gem 'rails', :git => git://github.com/github_user/your_rails.git
Upvotes: 5