从 Rails 2 升级到 Rails 3(以及 ruby 版本)时出现问题
我在从 Rails 2.3.10 升级到 Rails 3 时遇到问题 我正在升级一个现有的项目,我所做的是创建一个全新的 Rails 3.0.9 项目副本来覆盖代码(模型、视图等...)并更改rails_upgrade 插件推荐的内容。
另外,我升级了 gems 等。
现在,当我尝试启动服务器时,我遇到了这个问题:
/Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:123:in `include': wrong argument type Class (expected Module) (TypeError)
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:123:in `add_template_helper'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:123:in `module_eval'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:123:in `add_template_helper'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:98:in `helper'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:97:in `each'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:97:in `helper'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/action_controller/base.rb:228:in `inherited'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/bundler/gems/typus-974c0c36221d/app/controllers/admin/base_controller.rb:1
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:227:in `load_dependency'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:346:in `require_or_load'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:491:in `load_missing_constant'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:183:in `const_missing'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:181:in `each'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:181:in `const_missing'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/bundler/gems/typus-974c0c36221d/app/controllers/admin/account_controller.rb:1
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:227:in `load_dependency'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:346:in `require_or_load'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:300:in `depend_on'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:216:in `require_dependency'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/engine.rb:138:in `eager_load!'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/engine.rb:137:in `each'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/engine.rb:137:in `eager_load!'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/engine.rb:135:in `each'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/engine.rb:135:in `eager_load!'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/application.rb:209:in `to_proc'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/application/railties.rb:11:in `each'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/application/railties.rb:11:in `all'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/application.rb:107:in `eager_load!'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/application/finisher.rb:41
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/initializable.rb:25:in `instance_exec'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/initializable.rb:25:in `run'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/initializable.rb:50:in `run_initializers'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/initializable.rb:49:in `each'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/initializable.rb:49:in `run_initializers'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/application.rb:134:in `initialize!'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/application.rb:77:in `send'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/application.rb:77:in `method_missing'
from /Users/avitzurel/Dropbox/Projects/gogobot_rails3/config/environment.rb:5
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `load_dependency'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:596:in `new_constants_in'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `load_dependency'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/Dropbox/Projects/gogobot_rails3/config.ru:3
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/rack-1.2.3/lib/rack/builder.rb:46:in `instance_eval'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/rack-1.2.3/lib/rack/builder.rb:46:in `initialize'
from /Users/avitzurel/Dropbox/Projects/gogobot_rails3/config.ru:1:in `new'
from /Users/avitzurel/Dropbox/Projects/gogobot_rails3/config.ru:1
这是我的 gemfile
source 'http://rubygems.org'
gem 'rails', '3.0.9'
gem 'ar-extensions'
gem 'authlogic'
gem 'oauth'
gem 'twitter_oauth'
gem 'koala'
gem 'htmlentities'
# gem 'aws-s3', :require => 'aws/s3'
gem 'right_aws'
gem "typus", :git => "git://github.com/typus/typus.git", :branch => "3-0-stable"
gem 'flickraw'
gem 'delayed_job', '>= 2.0.4'
gem 'friendly_id', '3.1.7'
gem 'will_paginate', '~> 3.0'
gem 'rubyzip', :require => 'zip/zip'
gem 'nokogiri'
gem 'jammit'
gem 'mysql2', '< 0.3'
gem 'dalli'
gem 'closure-compiler'
gem 'yui-compressor', :require => 'yui/compressor'
gem 'geokit'
gem 'text'
gem 'fastercsv'
gem 'rapleaf_api'
gem 'hashie'
gem 'foursquare'
gem 'foursquare2'
gem 'oauth2'
gem 'google_places'
gem 'cancan'
gem 'juggernaut'
gem 'factory_girl'
gem 'whenever'
gem 'twitter'
gem 'sunspot', :require => 'sunspot'
gem 'sunspot_rails', :require => 'sunspot/rails'
gem 'bcrypt-ruby', :require => 'bcrypt'
gem 'validatable'
gem 'redis'
gem 'redis-namespace'
# Use unicorn as the web server
gem 'unicorn'
gem 'capistrano'
group :development, :test do
end
这是我的插件列表:
acts_as_abusable
acts_as_loggable
annotate_models
daemon_generator
masochism
mysql_bigint
perform_later
sitemap_generator
acts_as_likable
acts_as_solr
bitmask-attribute
gogo_cache
mobile-fu
oauth2_provider
resque
我已经在这个问题上挣扎了几个小时,我希望得到一个答案。
谢谢。
编辑: 这是我完全删除typus后的堆栈跟踪:
/Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:123:in `include': wrong argument type Class (expected Module) (TypeError)
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:123:in `add_template_helper'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:123:in `module_eval'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:123:in `add_template_helper'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:98:in `helper'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:97:in `each'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:97:in `helper'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/action_controller/base.rb:228:in `inherited'
from /Users/avitzurel/Dropbox/Projects/gogobot_rails3/app/controllers/application_controller.rb:1
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:227:in `load_dependency'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:346:in `require_or_load'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:491:in `load_missing_constant'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:183:in `const_missing'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:181:in `each'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:181:in `const_missing'
from /Users/avitzurel/Dropbox/Projects/gogobot_rails3/app/controllers/abuse_reports_controller.rb:1
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:227:in `load_dependency'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:346:in `require_or_load'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:300:in `depend_on'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:216:in `require_dependency'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/engine.rb:138:in `eager_load!'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/engine.rb:137:in `each'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/engine.rb:137:in `eager_load!'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/engine.rb:135:in `each'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/engine.rb:135:in `eager_load!'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/application.rb:108:in `eager_load!'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/application/finisher.rb:41
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/initializable.rb:25:in `instance_exec'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/initializable.rb:25:in `run'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/initializable.rb:50:in `run_initializers'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/initializable.rb:49:in `each'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/initializable.rb:49:in `run_initializers'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/application.rb:134:in `initialize!'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/application.rb:77:in `send'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/application.rb:77:in `method_missing'
from /Users/avitzurel/Dropbox/Projects/gogobot_rails3/config/environment.rb:5
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `load_dependency'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:596:in `new_constants_in'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `load_dependency'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/Dropbox/Projects/gogobot_rails3/config.ru:3
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/rack-1.2.3/lib/rack/builder.rb:46:in `instance_eval'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/rack-1.2.3/lib/rack/builder.rb:46:in `initialize'
from /Users/avitzurel/Dropbox/Projects/gogobot_rails3/config.ru:1:in `new'
from /Users/avitzurel/Dropbox/Projects/gogobot_rails3/config.ru:1
I am having an issue while upgrading from rails 2.3.10 to rails 3
I am upgrading an existing project, what I did is create a brand new rails 3.0.9 project copy over the code (models, views etc...) and changing the things that the rails_upgrade plugin recommended.
Also, I upgraded the gems etc..
Now, when I try to start the server I have this issue:
/Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:123:in `include': wrong argument type Class (expected Module) (TypeError)
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:123:in `add_template_helper'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:123:in `module_eval'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:123:in `add_template_helper'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:98:in `helper'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:97:in `each'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:97:in `helper'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/action_controller/base.rb:228:in `inherited'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/bundler/gems/typus-974c0c36221d/app/controllers/admin/base_controller.rb:1
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:227:in `load_dependency'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:346:in `require_or_load'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:491:in `load_missing_constant'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:183:in `const_missing'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:181:in `each'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:181:in `const_missing'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/bundler/gems/typus-974c0c36221d/app/controllers/admin/account_controller.rb:1
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:227:in `load_dependency'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:346:in `require_or_load'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:300:in `depend_on'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:216:in `require_dependency'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/engine.rb:138:in `eager_load!'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/engine.rb:137:in `each'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/engine.rb:137:in `eager_load!'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/engine.rb:135:in `each'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/engine.rb:135:in `eager_load!'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/application.rb:209:in `to_proc'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/application/railties.rb:11:in `each'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/application/railties.rb:11:in `all'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/application.rb:107:in `eager_load!'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/application/finisher.rb:41
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/initializable.rb:25:in `instance_exec'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/initializable.rb:25:in `run'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/initializable.rb:50:in `run_initializers'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/initializable.rb:49:in `each'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/initializable.rb:49:in `run_initializers'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/application.rb:134:in `initialize!'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/application.rb:77:in `send'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/application.rb:77:in `method_missing'
from /Users/avitzurel/Dropbox/Projects/gogobot_rails3/config/environment.rb:5
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `load_dependency'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:596:in `new_constants_in'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `load_dependency'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/Dropbox/Projects/gogobot_rails3/config.ru:3
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/rack-1.2.3/lib/rack/builder.rb:46:in `instance_eval'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/rack-1.2.3/lib/rack/builder.rb:46:in `initialize'
from /Users/avitzurel/Dropbox/Projects/gogobot_rails3/config.ru:1:in `new'
from /Users/avitzurel/Dropbox/Projects/gogobot_rails3/config.ru:1
This is my gemfile
source 'http://rubygems.org'
gem 'rails', '3.0.9'
gem 'ar-extensions'
gem 'authlogic'
gem 'oauth'
gem 'twitter_oauth'
gem 'koala'
gem 'htmlentities'
# gem 'aws-s3', :require => 'aws/s3'
gem 'right_aws'
gem "typus", :git => "git://github.com/typus/typus.git", :branch => "3-0-stable"
gem 'flickraw'
gem 'delayed_job', '>= 2.0.4'
gem 'friendly_id', '3.1.7'
gem 'will_paginate', '~> 3.0'
gem 'rubyzip', :require => 'zip/zip'
gem 'nokogiri'
gem 'jammit'
gem 'mysql2', '< 0.3'
gem 'dalli'
gem 'closure-compiler'
gem 'yui-compressor', :require => 'yui/compressor'
gem 'geokit'
gem 'text'
gem 'fastercsv'
gem 'rapleaf_api'
gem 'hashie'
gem 'foursquare'
gem 'foursquare2'
gem 'oauth2'
gem 'google_places'
gem 'cancan'
gem 'juggernaut'
gem 'factory_girl'
gem 'whenever'
gem 'twitter'
gem 'sunspot', :require => 'sunspot'
gem 'sunspot_rails', :require => 'sunspot/rails'
gem 'bcrypt-ruby', :require => 'bcrypt'
gem 'validatable'
gem 'redis'
gem 'redis-namespace'
# Use unicorn as the web server
gem 'unicorn'
gem 'capistrano'
group :development, :test do
end
This is my plugins list:
acts_as_abusable
acts_as_loggable
annotate_models
daemon_generator
masochism
mysql_bigint
perform_later
sitemap_generator
acts_as_likable
acts_as_solr
bitmask-attribute
gogo_cache
mobile-fu
oauth2_provider
resque
I am struggling with this one for a few hours now and I would love an answer.
Thanks.
EDIT:
This is the stacktrace after I removed typus completely:
/Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:123:in `include': wrong argument type Class (expected Module) (TypeError)
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:123:in `add_template_helper'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:123:in `module_eval'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:123:in `add_template_helper'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:98:in `helper'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:97:in `each'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/abstract_controller/helpers.rb:97:in `helper'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/actionpack-3.0.9/lib/action_controller/base.rb:228:in `inherited'
from /Users/avitzurel/Dropbox/Projects/gogobot_rails3/app/controllers/application_controller.rb:1
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:227:in `load_dependency'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:346:in `require_or_load'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:491:in `load_missing_constant'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:183:in `const_missing'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:181:in `each'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:181:in `const_missing'
from /Users/avitzurel/Dropbox/Projects/gogobot_rails3/app/controllers/abuse_reports_controller.rb:1
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:227:in `load_dependency'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:346:in `require_or_load'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:300:in `depend_on'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:216:in `require_dependency'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/engine.rb:138:in `eager_load!'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/engine.rb:137:in `each'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/engine.rb:137:in `eager_load!'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/engine.rb:135:in `each'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/engine.rb:135:in `eager_load!'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/application.rb:108:in `eager_load!'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/application/finisher.rb:41
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/initializable.rb:25:in `instance_exec'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/initializable.rb:25:in `run'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/initializable.rb:50:in `run_initializers'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/initializable.rb:49:in `each'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/initializable.rb:49:in `run_initializers'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/application.rb:134:in `initialize!'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/application.rb:77:in `send'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/railties-3.0.9/lib/rails/application.rb:77:in `method_missing'
from /Users/avitzurel/Dropbox/Projects/gogobot_rails3/config/environment.rb:5
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `load_dependency'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:596:in `new_constants_in'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `load_dependency'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /Users/avitzurel/Dropbox/Projects/gogobot_rails3/config.ru:3
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/rack-1.2.3/lib/rack/builder.rb:46:in `instance_eval'
from /Users/avitzurel/.rvm/gems/ruby-1.8.7-p334@gogo_web/gems/rack-1.2.3/lib/rack/builder.rb:46:in `initialize'
from /Users/avitzurel/Dropbox/Projects/gogobot_rails3/config.ru:1:in `new'
from /Users/avitzurel/Dropbox/Projects/gogobot_rails3/config.ru:1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许你的一个助手被意外地重新定义为
Class
你可以使用这个grep命令检查你的整个应用程序:
如果你发现任何东西,请仔细检查它不应该是一个
Module
代码> 代替。Maybe one of your helpers has been accidentally redefined as a
Class
You could check your whole app with this grep command:
If you find anything, double-check it shouldn't be a
Module
instead.所以,现在已经修复了...
我所做的是编辑这个文件 helpers.rb:123:in `include' (问题出在 Rails 中)
我只是输出当前正在加载的模块名称,结果发现 app/helpers 文件夹中的文件是一个类(几个月前有人把它放在那里)。
当我将此文件删除到 lib 文件夹后,rails 就可以很好地加载了。
感谢@arikfr 提供编辑此文件的提示:-)
So, it's fixed now...
what I did was to edit this file helpers.rb:123:in `include' (where the problem was in rails)
I just output the module name which is currently loading, turns out that one the the files in the app/helpers folder was a class (someone put it there months ago).
Once I removed this file to the lib folder, rails loaded up nicely.
And thanks to @arikfr for the tip to edit this file :-)