rbenv、Bundler 1.0.21、rubygems 1.8.1、Ruby v1.8.7、rails 2.3.15、rails3.0.18を使用しています。Railsアプリを2.3.15からRails3.0.18に移行中です。これらのバージョンを切り替えるときは、「バンドルインストール」を実行して、正しいgemのセットをポイントします。そして、これは、Rails 3.0.18から2.3.15に切り替えて仕様を実行するまでは正常に機能し、次のようになります。
/Users/me/.rbenv/versions/1.8.7-p357/lib/ruby/gems/1.8/gems/activesupport-2.3.15/lib/active_support/dependencies.rb:466:in
`load_missing_constant': uninitialized constant ActiveSupport::Concern (NameError)
from /Users/me/.rbenv/versions/1.8.7-p357/lib/ruby/gems/1.8/gems/activesupport-2.3.15/lib/active_support/dependencies.rb:106:in `const_missing'
from /Users/me/Code/repos/microplace/vendor/plugins/verification/lib/action_controller/verification.rb:3
from /Users/me/.rbenv/versions/1.8.7-p357/lib/ruby/gems/1.8/gems/actionpack-2.3.15/lib/action_controller/base.rb:1418
from /Users/me/.rbenv/versions/1.8.7-p357/lib/ruby/gems/1.8/gems/actionpack-2.3.15/lib/action_controller/base.rb:1416:in `class_eval'
from /Users/me/.rbenv/versions/1.8.7-p357/lib/ruby/gems/1.8/gems/actionpack-2.3.15/lib/action_controller/base.rb:1416
from /Users/me/Code/repos/microplace/config/environments/development.rb:12:in `load_environment'
from /Users/me/.rbenv/versions/1.8.7-p357/lib/ruby/gems/1.8/gems/rails-2.3.15/lib/initializer.rb:386:in `load_environment'
from /Users/me/.rbenv/versions/1.8.7-p357/lib/ruby/gems/1.8/gems/activesupport-2.3.15/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
from /Users/me/.rbenv/versions/1.8.7-p357/lib/ruby/gems/1.8/gems/rails-2.3.15/lib/initializer.rb:379:in `load_environment'
from /Users/me/.rbenv/versions/1.8.7-p357/lib/ruby/gems/1.8/gems/rails-2.3.15/lib/initializer.rb:137:in `process'
from /Users/me/.rbenv/versions/1.8.7-p357/lib/ruby/gems/1.8/gems/rails-2.3.15/lib/initializer.rb:113:in `send'
from /Users/me/.rbenv/versions/1.8.7-p357/lib/ruby/gems/1.8/gems/rails-2.3.15/lib/initializer.rb:113:in `run'
from /Users/me/Dropbox/Code/repos/microplace/config/environment.rb:15
from /Users/me/.rbenv/versions/1.8.7-p357/lib/ruby/gems/1.8/gems/rails-2.3.15/lib/commands/runner.rb:39:in `require'
from /Users/me/.rbenv/versions/1.8.7-p357/lib/ruby/gems/1.8/gems/rails-2.3.15/lib/commands/runner.rb:39
from script/runner:3:in `require'
from script/runner:3
Rubygemsとの非互換性の問題があるのではないかと考えて、バージョン1.3.4、1.4.5、および1.5.0にダウングレードしてみたところ、同じ結果になりました。
レールのある宝石を実行すると、次のようになります。
/Users/me/.rbenv/versions/1.8.7-p357/lib/ruby/gems/1.8/gems/railties-3.0.18/lib/rails.rb
そこで、レールをアンインストールしました。同じ結果になります。
activesupportが返すgem:
/Users/me/.rbenv/versions/1.8.7-p357/lib/ruby/gems/1.8/gems/activesupport-2.3.15/lib/activesupport.rb
また、次のスクリプトを使用して、.rbenv / versions / 1.8.7-p357 / lib / ruby / gems / 1.8 / gems/ディレクトリ内のすべてのgemを削除してみました:https ://gist.github.com/IanVaughan/2902499およびバンドルインストールを使用して再インストールすると、同じ結果になります。
これが私のGemfileです
source :gemcutter
gem "rails", "2.3.15"
gem 'activesupport', '2.3.15'
gem "mysql"
gem "rake", "0.9.2"
gem "rack", "1.1.3"
gem "mongrel"
# bundler requires these gems in all environments
gem "nokogiri"
gem "money", "5.0.0"
gem "memcache-client"
gem "oauth"
gem "fastercsv"
gem "pdf-writer"
gem "json", "1.5.3"
gem "rmagick", :require => 'RMagick'
gem "twitter"
gem "will_paginate", "2.3.15"
gem "image_science"
gem "RubyInline"
gem "sentry"
gem "netaddr"
gem "hashie"
gem "activemerchant", "~>1.24.0"
gem "httparty"
gem "httmultiparty"
gem "ruby-hmac"
gem "mogli"
gem "SystemTimer"
gem "net-sftp"
gem "roxml"
gem "rdoc"
gem "omniauth-salesforce"
gem "xml-simple"
gem "rcov"
gem "ZenTest", "4.8.3"
group :development do
# bundler requires these gems in development
# gem "rails-footnotes"
end
group :test do
# bundler requires these gems while running tests
gem "rdoc"
gem "rcov"
gem "factory_girl", '2.6.4'
gem "mocha", '< 0.13.0', :require => false
gem "timecop"
gem "rspec", '~> 1.3.0'
gem "rspec-rails", '~> 1.3.4'
gem "cucumber-rails", '~> 0.3.2'
gem "database_cleaner", '~> 0.5.0'
gem "webrat", '~> 0.7.0'
gem "redgreen"
gem "launchy"
gem 'shoulda', :require => false
end
group :development, :test do
gem "ruby-debug"
#gem "ruby-debug-ide"
end
group :production, :salesforce_staging do
gem "mongrel_cluster"
gem "daemons"
end
Gemfile.lock:
GEM
remote: http://rubygems.org/
specs:
RubyInline (3.12.1)
ZenTest (~> 4.3)
SystemTimer (1.2.3)
ZenTest (4.8.3)
actionmailer (2.3.15)
actionpack (= 2.3.15)
actionpack (2.3.15)
activesupport (= 2.3.15)
rack (~> 1.1.3)
active_utils (1.0.5)
activesupport (>= 2.3.11)
i18n
activemerchant (1.24.0)
active_utils (>= 1.0.2)
activesupport (>= 2.3.11)
builder (>= 2.0.0)
i18n
json (>= 1.5.1)
money
nokogiri
activerecord (2.3.15)
activesupport (= 2.3.15)
activeresource (2.3.15)
activesupport (= 2.3.15)
activesupport (2.3.15)
addressable (2.3.3)
builder (3.2.0)
cgi_multipart_eof_fix (2.5.0)
color (1.4.1)
columnize (0.3.6)
cucumber (1.2.1)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
gherkin (~> 2.11.0)
json (>= 1.4.6)
cucumber-rails (0.3.2)
cucumber (>= 0.8.0)
daemons (1.1.9)
database_cleaner (0.5.2)
diff-lcs (1.2.1)
factory_girl (2.6.4)
activesupport (>= 2.3.9)
faraday (0.8.6)
multipart-post (~> 1.1)
fastercsv (1.5.5)
fastthread (1.0.7)
gem_plugin (0.2.3)
gherkin (2.11.5)
json (>= 1.4.6)
hashie (1.2.0)
httmultiparty (0.3.8)
httparty (>= 0.7.3)
multipart-post
httparty (0.10.2)
multi_json (~> 1.0)
multi_xml (>= 0.5.2)
httpauth (0.2.0)
i18n (0.6.4)
image_science (1.2.4)
RubyInline (~> 3.9)
json (1.5.3)
launchy (2.2.0)
addressable (~> 2.3)
linecache (0.46)
rbx-require-relative (> 0.0.4)
memcache-client (1.8.5)
metaclass (0.0.1)
mocha (0.12.10)
metaclass (~> 0.0.1)
mogli (0.0.28)
httparty (>= 0.4.3)
money (5.0.0)
i18n (~> 0.4)
json
mongrel (1.1.5)
cgi_multipart_eof_fix (>= 2.4)
daemons (>= 1.0.3)
fastthread (>= 1.0.1)
gem_plugin (>= 0.2.3)
mongrel_cluster (1.0.5)
gem_plugin (>= 0.2.3)
mongrel (>= 1.0.2)
multi_json (1.6.1)
multi_xml (0.5.3)
multipart-post (1.2.0)
mysql (2.9.1)
net-sftp (2.1.1)
net-ssh (>= 2.6.5)
net-ssh (2.6.6)
netaddr (1.5.0)
nokogiri (1.5.6)
oauth (0.4.7)
oauth2 (0.6.1)
faraday (~> 0.7)
httpauth (~> 0.1)
multi_json (~> 1.3)
omniauth (1.1.3)
hashie (~> 1.2)
rack
omniauth-oauth2 (1.0.2)
oauth2 (~> 0.6.0)
omniauth (~> 1.0)
omniauth-salesforce (1.0.3)
omniauth (~> 1.0)
omniauth-oauth2 (~> 1.0)
pdf-writer (1.1.8)
color (>= 1.4.0)
transaction-simple (~> 1.3)
rack (1.1.3)
rack-test (0.6.2)
rack (>= 1.0)
rails (2.3.15)
actionmailer (= 2.3.15)
actionpack (= 2.3.15)
activerecord (= 2.3.15)
activeresource (= 2.3.15)
activesupport (= 2.3.15)
rake (>= 0.8.3)
rake (0.9.2)
rbx-require-relative (0.0.9)
rcov (1.0.0)
rdoc (4.0.0)
json (~> 1.4)
redgreen (1.2.2)
rmagick (2.13.2)
roxml (3.3.1)
activesupport (>= 2.3.0)
nokogiri (>= 1.3.3)
rspec (1.3.2)
rspec-rails (1.3.4)
rack (>= 1.0.0)
rspec (~> 1.3.1)
ruby-debug (0.10.4)
columnize (>= 0.1)
ruby-debug-base (~> 0.10.4.0)
ruby-debug-base (0.10.4)
linecache (>= 0.3)
ruby-hmac (0.4.0)
sentry (0.5.3)
shoulda (3.0.1)
shoulda-context (~> 1.0.0)
shoulda-matchers (~> 1.0.0)
shoulda-context (1.0.2)
shoulda-matchers (1.0.0)
simple_oauth (0.2.0)
timecop (0.6.0)
transaction-simple (1.4.0.2)
twitter (4.6.0)
faraday (~> 0.8, < 0.10)
multi_json (~> 1.0)
simple_oauth (~> 0.2)
webrat (0.7.3)
nokogiri (>= 1.2.0)
rack (>= 1.0)
rack-test (>= 0.5.3)
will_paginate (2.3.15)
xml-simple (1.1.2)
PLATFORMS
ruby
DEPENDENCIES
RubyInline
SystemTimer
ZenTest (= 4.8.3)
activemerchant (~> 1.24.0)
activesupport (= 2.3.15)
cucumber-rails (~> 0.3.2)
daemons
database_cleaner (~> 0.5.0)
factory_girl (= 2.6.4)
fastercsv
hashie
httmultiparty
httparty
image_science
json (= 1.5.3)
launchy
memcache-client
mocha (< 0.13.0)
mogli
money (= 5.0.0)
mongrel
mongrel_cluster
mysql
net-sftp
netaddr
nokogiri
oauth
omniauth-salesforce
pdf-writer
rack (= 1.1.3)
rails (= 2.3.15)
rake (= 0.9.2)
rcov
rdoc
redgreen
rmagick
roxml
rspec (~> 1.3.0)
rspec-rails (~> 1.3.4)
ruby-debug
ruby-hmac
sentry
shoulda
timecop
twitter
webrat (~> 0.7.0)
will_paginate (= 2.3.15)
xml-simple
私は困惑しています。どうすればこれを乗り越えることができるかについてのアイデアを事前に感謝します!