简体   繁体   中英

Rails 2 “script/plugin” install git://github.com…git throws cannot load such file

I have a rails 2 app and I'm trying to upgrade to Rails 3.1.0 first.

After doing a bit of research, I found this plugin:

https://github.com/rails/rails_upgrade

Which states that the first I have to install a plugin with:

script/plugin install git://github.com/rails/rails_upgrade.git

However, I get this error:

/home/bogdan/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- script/../config/boot (LoadError)
from /home/bogdan/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from script/plugin:2:in `<main>'

My script/plugin file:

#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/plugin'

I can run script/server script/console or script/dbconsole with no problem.

What am I doing wrong?

I didn't think that would be the answer but use ruby 1.8.7.

Using an old rails 2 app with ruby 1.9.3 or 2 script/plugin doesn't work, with 1.8.7 script/plugin does for me

I had the exact same problem...ran all over and found the oddest solution

./script/plugin install git://github.com/rails/rails_upgrade.git

and I kept ruby 1.9.3p194 and rails 2.3.14 no 1.8.7 needed

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