简体   繁体   中英

Rails gem fork issue

I'm applying a patch to my fork of 2.3.15 rails for a workaround for one of the latest security issues.

Previously in my gem file I had -

gem 'rails', '2.3.15'

And everything worked as expected. But for my fork I have

gem 'rails', '2.3.15', :git => 'git@github.com:myrepo/rails.git', :branch => 'CVE-2013-0155-fix'

After doing a bundle install and then running my app with bundle exec ruby script/server as per usual, I'm getting this error -

| ./script/../config/boot.rb:64:in `require': no such file to load -- initializer (LoadError)

I thought that maybe I had just messed something up with my fork but when I point my gemfile to the rails git repo I get the same issue.

gem 'rails', '2.3.15', :git => 'git@github.com:rails/rails.git', :tag => 'v2.3.15'

Can anyone explain to me what's up?

Found an excellent blogpost on the issue here - http://robanderson123.wordpress.com/2013/01/05/applying-backported-security-patches-to-rails-2-3/

The big problem being that rails/2-3-stable doesn't have any gemspecs in the repo. Long story short, did a bundle install with rails set to 2.3.15. Copied the rails gemspecs for activerecord etc out of the specifications directory bundle show rails gives into each of the corresponding directories in my fork of rails. With the exception of the rails gemspec which I copied into the railties directory.

After this gem 'rails', '2.3.15', :git => 'git@github.com:myrepo/rails.git', :branch => 'my-2-3-branch' works as expected.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM