I am getting this error when starting JBoss with my application built with warbler:
Error: unable to initialize application
org.jruby.rack.RackInitializationException: wrong number of arguments (1 for 0)
Callstack:
gems/gems/actionpack-3.0.9/lib/action_controller/railtie.rb:54:in `Railtie'
gems/gems/activesupport-3.0.9/lib/active_support/ordered_hash.rb:139:in `each'
org/jruby/RubyArray.java:1612:in `each'
gems/gems/activesupport-3.0.9/lib/active_support/ordered_hash.rb:139:in `each'
gems/gems/actionpack-3.0.9/lib/action_controller/railtie.rb:54:in `Railtie'
org/jruby/RubyKernel.java:2062:in `instance_eval'
gems/gems/activesupport-3.0.9/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
gems/gems/activesupport-3.0.9/lib/active_support/lazy_load_hooks.rb:43:in `run_load_hooks'
org/jruby/RubyArray.java:1612:in `each'
gems/gems/activesupport-3.0.9/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
gems/gems/actionpack-3.0.9/lib/action_controller/base.rb:232:in `Base'
gems/gems/actionpack-3.0.9/lib/action_controller/base.rb:169:in `ActionController'
gems/gems/actionpack-3.0.9/lib/action_controller/base.rb:3:in `(root)'
gems/gems/actionpack-3.0.9/lib/action_controller/base.rb:48:in `Railtie'
org/jruby/RubyKernel.java:2079:in `instance_exec'
gems/gems/railties-3.0.9/lib/rails/initializable.rb:25:in `run'
gems/gems/railties-3.0.9/lib/rails/initializable.rb:50:in `run_initializers'
org/jruby/RubyArray.java:1612:in `each'
gems/gems/railties-3.0.9/lib/rails/initializable.rb:49:in `run_initializers'
gems/gems/railties-3.0.9/lib/rails/application.rb:134:in `initialize!'
org/jruby/RubyKernel.java:2093:in `send'
gems/gems/railties-3.0.9/lib/rails/application.rb:77:in `method_missing'
config/environment.rb:5:in `(root)'
org/jruby/RubyKernel.java:1038:in `require'
config/environment.rb:167:in `load_environment'
classpath:/./jruby/rack/rails.rb:172:in `to_app'
classpath:/./jruby/rack/rails.rb:192:in `new'
<web.xml>:1:in `(root)'
org/jruby/RubyKernel.java:2062:in `instance_eval'
classpath:/./vendor/rack-1.3.5/rack/builder.rb:51:in `initialize'
<web.xml>:1:in `(root)'
Any ideas?
We had the same problems with Rails 3.0.11 / JBoss 5 and the latest jruby-rack.
To sort this out we had to use jruby-rack 1.0.10
Please try to put this line into your Gemfile:
gem 'jruby-rack', '1.0.10'
I got this same error when upgrading an app to Rails 3. The problem was related to invoking ActionController::Base.relative_url_root=, which is supposed to emit a deprecation warning, but it was busted in Rails 3.0.10.
My solution was to upgrade to jruby-rack 1.1.4 and rack 1.2.5.
Related
I'm using Ruby 1.9.3 and Rails 3.2.17 for this project. I plan to upgrade to Rails 4 but meet a lot gem incompatibilities, so I try to update some gem at first.
I am updating formtastic from 2.0.2 to 3.1.3.
I see a lot of deprecation warnings like this:
DEPRECATION WARNING: input_class is deprecated and will be removed from Formtastic 4.0 (configure Formtastic::FormBuilder.input_class_finder instead (upgrade guide on wiki: http://bit.ly/1F9QtKc )). (called from _app_views_prescriptions__fields_html_haml___278490936240938991_103076320 at /home/hegwin/Workspace/rails_projects/pharmmd/app/views/prescriptions/_fields.html.haml:7)
And I followed formtastic wiki Upgrading to Formtastic 3.1 , and I added these two lines to config/initializers/formtastic.rb
Formtastic::FormBuilder.action_class_finder = Formtastic::ActionClassFinder
Formtastic::FormBuilder.input_class_finder = Formtastic::InputClassFinder
After that when I tried to run the rspec, it threw an error:
NoMethodError: undefined method `eager_load' for #<Rails::Application::Configuration:0x00000006306a50>
/home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/railties-3.2.17/lib/rails/railtie/configuration.rb:85:in `method_missing': undefined method `eager_load' for #<Rails::Application::Configuration:0x00000006459b50> (NoMethodError)
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/formtastic-3.1.3/lib/formtastic/namespaced_class_finder.rb:32:in `use_const_defined?'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/formtastic-3.1.3/lib/formtastic/namespaced_class_finder.rb:69:in `<class:NamespacedClassFinder>'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/formtastic-3.1.3/lib/formtastic/namespaced_class_finder.rb:24:in `<module:Formtastic>'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/formtastic-3.1.3/lib/formtastic/namespaced_class_finder.rb:1:in `<top (required)>'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/formtastic-3.1.3/lib/formtastic/action_class_finder.rb:7:in `<module:Formtastic>'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/formtastic-3.1.3/lib/formtastic/action_class_finder.rb:1:in `<top (required)>'
from /home/hegwin/Workspace/rails_projects/pharmmd/config/initializers/formtastic.rb:104:in `<top (required)>'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/zeus-0.13.3/lib/zeus/load_tracking.rb:50:in `load'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/zeus-0.13.3/lib/zeus/load_tracking.rb:50:in `load'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/zeus-0.13.3/lib/zeus/load_tracking.rb:43:in `load'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `block in load'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `load'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/railties-3.2.17/lib/rails/engine.rb:593:in `block (2 levels) in <class:Engine>'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/railties-3.2.17/lib/rails/engine.rb:592:in `each'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/railties-3.2.17/lib/rails/engine.rb:592:in `block in <class:Engine>'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/railties-3.2.17/lib/rails/initializable.rb:30:in `instance_exec'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/railties-3.2.17/lib/rails/initializable.rb:30:in `run'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/railties-3.2.17/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/railties-3.2.17/lib/rails/initializable.rb:54:in `each'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/railties-3.2.17/lib/rails/initializable.rb:54:in `run_initializers'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/railties-3.2.17/lib/rails/application.rb:136:in `initialize!'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/railties-3.2.17/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/hegwin/Workspace/rails_projects/pharmmd/config/environment.rb:5:in `<top (required)>'
from /home/hegwin/Workspace/rails_projects/pharmmd/spec/spec_helper.rb:12:in `require'
from /home/hegwin/Workspace/rails_projects/pharmmd/spec/spec_helper.rb:12:in `<top (required)>'
from /home/hegwin/Workspace/rails_projects/pharmmd/spec/features/patient_edit_medication.feature:1:in `require'
from /home/hegwin/Workspace/rails_projects/pharmmd/spec/features/patient_edit_medication.feature:1:in `<top (required)>'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `block in load_spec_files'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `each'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load_spec_files'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/rspec-core-2.13.1/lib/rspec/core/command_line.rb:22:in `run'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:80:in `run'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:17:in `block in autorun'
The issue is known to the formtastic team. See issues #1137 and #1135 for details. In short, a stop-gap measure is to utilize the issue_1135 branch of the sepastian fork. Here's the Gemfile line:
gem 'formtastic', :git => 'git://github.com/sepastian/formtastic.git', :branch => 'issue_1135'
A better idea is to fork that branch to create your own repository.
My rails project works before. I got this error because I deleted mysql and everything associated mysql.
Then I reinstalled mysql. It got this error. Then I reinstalled ruby and rails. The error is still here. Using "rails new myapp",
then "bundle instal",
then "rails s",
I got the following error:
=> Booting WEBrick
=> Rails 4.0.2 application starting in development on
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
**/home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/railtie/configuration.rb:95:in `method_missing': undefined method `active_record' for #<Rails::Application::Configuration:0x0000000303cae8> (NoMethodError)
from /home/cwu/Dropbox/project/web/atop/config/environments/development.rb:23:in `block in <top (required)>'**
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:24:in `class_eval'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:24:in `configure'
from /home/cwu/Dropbox/project/web/atop/config/environments/development.rb:1:in `<top (required)>'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:591:in `block (2 levels) in <class:Engine>'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:590:in `each'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:590:in `block in <class:Engine>'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from'
from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `each'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `tsort_each_child'
from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:411:in `call'
from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:411:in `each_strongly_connected_component_from'
from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `each'
from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `call'
from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/cwu/Dropbox/project/web/atop/config/environment.rb:5:in `<top (required)>'
from /home/cwu/Dropbox/project/web/atop/config.ru:3:in `require'
from /home/cwu/Dropbox/project/web/atop/config.ru:3:in `block in <main>'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from /home/cwu/Dropbox/project/web/atop/config.ru:in `new'
from /home/cwu/Dropbox/project/web/atop/config.ru:in `<main>'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands/server.rb:48:in `app'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands/server.rb:75:in `start'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands.rb:76:in `block in <top (required)>'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
The error is clear that in config/environments/development.rb:23 you configure active_record which is not loaded.
Just remove
config.active_record.migration_error = :page_load
Will be ok.
Leedy Liu is right to some degree, but if you're getting this error when you create a new Rails app, t suggests a deeper problem with your environment
According to this answer, you may have require "active_record/railtie" commented out in your application.rb file. Please check to make sure this is not the case
You may have to re-install Rails with ActiveRecord to ensure the functionality is restored with your app. Have you tried this:
gem install bundler
gem install rails
bundle install
Other than that, you need to ensure Ruby on Rails is installed correctly. What env are you running? Linux or Windows?
As a general fix, remove all references to active_record. Easiest way is to do a find on the root directory of "active_records", find all usages, and remove them. I found usages in config/application.rb and config/environments/development and production.rb.
Try:
'gem install bundler'
then:
'bundle install'
again.
See if it clears up.
Comment config.active_record.raise_in_transactional_callbacks = true in config/application.rb and config.active_record.migration_error = :page_load in config/environments/development.rb.
I've recently upgraded my rails 3.2 project to 4.0. I've been successful in upgrading my app for the most part by following the guides. I have a few issues that I'm not sure what direction I should go and I'm looking for some help.
I was using quite a few attr_accessible on my models that I've now removed based in the advice in the guides. The guides say :
Rails 4.0 has removed attr_accessible and attr_protected feature in
favor of Strong Parameters. You can use the Protected Attributes gem
for a smooth upgrade path.
This gem got my application running but anytime I try to create a new object such as a user, message, etc. I get an error. From some research this seems common when using the new gem. It was suggested to remove the gem which would solve the new object issues. I did that but now I'm getting multiple errors from some of the other gems in my applications (And yes I've upgraded all gems to the most recent versions). Here is the error I'm getting:
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/activemodel-4.0.0/lib/active_model/deprecated_mass_assignment_security.rb:14:in `attr_accessible': `attr_accessible` is extracted out of Rails into a gem. Please use new recommended protection model for params(strong_parameters) or add `protected_attributes` to your Gemfile to use old one. (RuntimeError)
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/acts-as-messageable-0.4.8/lib/acts-as-messageable/message.rb:8:in `<class:Message>'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/acts-as-messageable-0.4.8/lib/acts-as-messageable/message.rb:4:in `<module:ActsAsMessageable>'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/acts-as-messageable-0.4.8/lib/acts-as-messageable/message.rb:3:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:228:in `const_get'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:228:in `block in constantize'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:224:in `each'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:224:in `inject'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:224:in `constantize'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/core_ext/string/inflections.rb:66:in `constantize'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/acts-as-messageable-0.4.8/lib/acts-as-messageable/model.rb:34:in `acts_as_messageable'
from /Users/dave/rails_projects/EquiptMe/app/models/user.rb:14:in `<class:User>'
from /Users/dave/rails_projects/EquiptMe/app/models/user.rb:1:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:423:in `load'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:423:in `block in load_file'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:615:in `new_constants_in'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:422:in `load_file'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:323:in `require_or_load'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:462:in `load_missing_constant'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:183:in `const_missing'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:226:in `const_get'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:226:in `block in constantize'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:224:in `each'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:224:in `inject'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:224:in `constantize'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:534:in `get'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:565:in `constantize'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/devise-3.0.1/lib/devise.rb:278:in `get'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/devise-3.0.1/lib/devise/mapping.rb:77:in `to'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/devise-3.0.1/lib/devise/mapping.rb:72:in `modules'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/devise-3.0.1/lib/devise/mapping.rb:89:in `routes'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/devise-3.0.1/lib/devise/mapping.rb:156:in `default_used_route'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/devise-3.0.1/lib/devise/mapping.rb:66:in `initialize'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/devise-3.0.1/lib/devise.rb:312:in `new'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/devise-3.0.1/lib/devise.rb:312:in `add_mapping'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/devise-3.0.1/lib/devise/rails/routes.rb:208:in `block in devise_for'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/devise-3.0.1/lib/devise/rails/routes.rb:207:in `each'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/devise-3.0.1/lib/devise/rails/routes.rb:207:in `devise_for'
from /Users/dave/rails_projects/EquiptMe/config/routes.rb:7:in `block in <top (required)>'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:316:in `instance_exec'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:316:in `eval_block'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:294:in `draw'
from /Users/dave/rails_projects/EquiptMe/config/routes.rb:1:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `block in load'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `each'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/file_update_checker.rb:75:in `call'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/file_update_checker.rb:75:in `execute'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:27:in `updater'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:6:in `execute_if_updated'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'
from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/dave/rails_projects/EquiptMe/config/environment.rb:5:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /Users/dave/rails_projects/EquiptMe/config.ru:3:in `block in <main>'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from /Users/dave/rails_projects/EquiptMe/config.ru:in `new'
from /Users/dave/rails_projects/EquiptMe/config.ru:in `<main>'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands/server.rb:48:in `app'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands/server.rb:75:in `start'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:78:in `block in <top (required)>'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:73:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Could someone point me in the right direction?
Thanks
I would try using the master branch of the "acts-as-messageable" gem in your Gemfile. It looks like there have been some updates related to Rails 4 since it was last released. If that fixes it, I'd ping the author to see if they'd release a new version.
There is a new gem created recently to help with upgrading from Rails 3 to Rails 4. I've used it recently and it made the upgrading process so much easier.
The gem is called wize_upgrader.
One thing that this gem does with attr_accessible in rails 3 models is that is converts it into strong params for you in your controller.
i.e: (in posts_controller)
def post_params
params.require(:post).permit(:title, :content, :tag)
end
I'hve used spree paypal express extension on spree(https://github.com/spree/spree_paypal_express), got following error for rake db:migrate.
Ruby 1.8.7 and rails 3.1.3
rake aborted!
superclass must be a Class (Module given)
/Users/kunalsupe/Developer/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:456:in `load_file'
/Users/kunalsupe/Developer/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in `new_constants_in'
/Users/kunalsupe/Developer/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:455:in `load_file'
/Users/kunalsupe/Developer/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:342:in `require_or_load'
/Users/kunalsupe/Developer/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:489:in `load_missing_constant'
/Users/kunalsupe/Developer/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:181:in `const_missing'
/Users/kunalsupe/Developer/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:179:in `each'
/Users/kunalsupe/Developer/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:179:in `const_missing'
/Users/kunalsupe/Developer/.rvm/gems/ruby-1.8.7-p302/bundler/gems/spree_paypal_express-6e6b553313c5/lib/spree_paypal_express/engine.rb:20
/Users/kunalsupe/Developer/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:34:in `call'
/Users/kunalsupe/Developer/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:34:in `execute_hook'
/Users/kunalsupe/Developer/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:43:in `run_load_hooks'
/Users/kunalsupe/Developer/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:42:in `each'
/Users/kunalsupe/Developer/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
/Users/kunalsupe/Developer/.rvm/gems/ruby-1.8.7-p302/gems/railties-3.1.1/lib/rails/application/finisher.rb:56
/Users/kunalsupe/Developer/.rvm/gems/ruby-1.8.7-p302/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `instance_exec'
/Users/kunalsupe/Developer/.rvm/gems/ruby-1.8.7-p302/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `run'
/Users/kunalsupe/Developer/.rvm/gems/ruby-1.8.7-p302/gems/railties-3.1.1/lib/rails/initializable.rb:55:in `run_initializers'
/Users/kunalsupe/Developer/.rvm/gems/ruby-1.8.7-p302/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `each'
/Users/kunalsupe/Developer/.rvm/gems/ruby-1.8.7-p302/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `run_initializers'
/Users/kunalsupe/Developer/.rvm/gems/ruby-1.8.7-p302/gems/railties-3.1.1/lib/rails/application.rb:96:in `initialize!'
/Users/kunalsupe/Developer/.rvm/gems/ruby-1.8.7-p302/gems/railties-3.1.1/lib/rails/railtie/configurable.rb:30:in `send'
/Users/kunalsupe/Developer/.rvm/gems/ruby-1.8.7-p302/gems/railties-3.1.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
Is there any solution to this
You're using the wrong version of this extension. Please check the extension's Version for the correct version to use with the version of Spree that you're using.
For example, with Spree 0.70.x you should be using this ref.
Your problem is caused by using a too-new version of the extension for the version of Spree that you're on.
I updated to Rails 3.0.8.rc2 recently, and then updated the paperclip gem to 2.3.11 (this fails on 2.3.10 as well). On startup, the paperclip gem seems to be not registering:
/Users/jade/code/plantworking/app/models/comment.rb:17: undefined method `has_attached_file' for Comment:Class (NoMethodError)
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/activesupport-3.0.8.rc2/lib/active_support/dependencies.rb:454:in `load'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/activesupport-3.0.8.rc2/lib/active_support/dependencies.rb:454:in `load_file'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/activesupport-3.0.8.rc2/lib/active_support/dependencies.rb:596:in `new_constants_in'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/activesupport-3.0.8.rc2/lib/active_support/dependencies.rb:453:in `load_file'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/activesupport-3.0.8.rc2/lib/active_support/dependencies.rb:340:in `require_or_load'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/activesupport-3.0.8.rc2/lib/active_support/dependencies.rb:300:in `depend_on'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/activesupport-3.0.8.rc2/lib/active_support/dependencies.rb:216:in `require_dependency'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/mongoid-2.0.2/lib/rails/mongoid.rb:55:in `load_model'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/mongoid-2.0.2/lib/rails/mongoid.rb:18:in `load_models'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/mongoid-2.0.2/lib/rails/mongoid.rb:17:in `each'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/mongoid-2.0.2/lib/rails/mongoid.rb:17:in `load_models'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/railties-3.0.8.rc2/lib/rails/paths.rb:102:in `each'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/railties-3.0.8.rc2/lib/rails/paths.rb:102:in `each'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/mongoid-2.0.2/lib/rails/mongoid.rb:16:in `load_models'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/mongoid-2.0.2/lib/mongoid/railtie.rb:86:in `_callback_before_5'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/activesupport-3.0.8.rc2/lib/active_support/callbacks.rb:420:in `_run_prepare_callbacks'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/actionpack-3.0.8.rc2/lib/action_dispatch/middleware/callbacks.rb:40:in `initialize'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/actionpack-3.0.8.rc2/lib/action_dispatch/middleware/stack.rb:33:in `new'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/actionpack-3.0.8.rc2/lib/action_dispatch/middleware/stack.rb:33:in `build'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/actionpack-3.0.8.rc2/lib/action_dispatch/middleware/stack.rb:79:in `build'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/railties-3.0.8.rc2/lib/rails/application.rb:209:in `inject'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/actionpack-3.0.8.rc2/lib/action_dispatch/middleware/stack.rb:79:in `each'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/actionpack-3.0.8.rc2/lib/action_dispatch/middleware/stack.rb:79:in `inject'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/actionpack-3.0.8.rc2/lib/action_dispatch/middleware/stack.rb:79:in `build'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/railties-3.0.8.rc2/lib/rails/application.rb:162:in `build_middleware_stack'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/railties-3.0.8.rc2/lib/rails/application/finisher.rb:35
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/railties-3.0.8.rc2/lib/rails/initializable.rb:25:in `instance_exec'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/railties-3.0.8.rc2/lib/rails/initializable.rb:25:in `run'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/railties-3.0.8.rc2/lib/rails/initializable.rb:50:in `run_initializers'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/railties-3.0.8.rc2/lib/rails/initializable.rb:49:in `each'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/railties-3.0.8.rc2/lib/rails/initializable.rb:49:in `run_initializers'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/railties-3.0.8.rc2/lib/rails/application.rb:134:in `initialize!'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/railties-3.0.8.rc2/lib/rails/application.rb:77:in `send'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/railties-3.0.8.rc2/lib/rails/application.rb:77:in `method_missing'
from /Users/jade/code/plantworking/config/environment.rb:11
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/polyglot-0.3.1/lib/polyglot.rb:64:in `polyglot_original_require'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/polyglot-0.3.1/lib/polyglot.rb:64:in `require'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/activesupport-3.0.8.rc2/lib/active_support/dependencies.rb:239:in `require'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/activesupport-3.0.8.rc2/lib/active_support/dependencies.rb:225:in `load_dependency'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/activesupport-3.0.8.rc2/lib/active_support/dependencies.rb:596:in `new_constants_in'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/activesupport-3.0.8.rc2/lib/active_support/dependencies.rb:225:in `load_dependency'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/activesupport-3.0.8.rc2/lib/active_support/dependencies.rb:239:in `require'
from /Users/jade/code/plantworking/config.ru:3
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/rack-1.2.3/lib/rack/builder.rb:46:in `instance_eval'
from /Users/jade/.rvm/gems/ree-1.8.7-2010.02#plantworking/gems/rack-1.2.3/lib/rack/builder.rb:46:in `initialize'
from /Users/jade/code/plantworking/config.ru:1:in `new'
from /Users/jade/code/plantworking/config.ru:1
I am using Mongoid 2.0.2.
Anyone get paperclip working with Rails 3.0.8+ ?
PaperClip by default only works on ActiveRecord. You might want to try the mongoid version of PaperClip or switch over to Carrierwave.