Can't load 'firewatir' gem in rails 3 - ruby-on-rails-3

I want to run cucumber command in rails 3 controllers,but I add 'gem firewatir' to gemfile,
when I 'rails server', I got this error,and page shows "Internal Server Error".
[2011-03-24 14:32:05] INFO WEBrick 1.3.1
[2011-03-24 14:32:05] INFO ruby 1.8.7 (2009-06-12) [universal-darwin10.0]
[2011-03-24 14:32:05] INFO WEBrick::HTTPServer#start: pid=91734 port=3000
[2011-03-24 14:32:06] ERROR NoMethodError: undefined method `cache' for :active_support:Symbol
/Library/Ruby/Gems/1.8/gems/activesupport-3.0.5/lib/active_support/cache/strategy/local_cache.rb:74:in `call'
/Library/Ruby/Gems/1.8/gems/rack-1.2.2/lib/rack/lock.rb:11:in `call'
/Library/Ruby/Gems/1.8/gems/rack-1.2.2/lib/rack/lock.rb:11:in `synchronize'
/Library/Ruby/Gems/1.8/gems/rack-1.2.2/lib/rack/lock.rb:11:in `call'
/Library/Ruby/Gems/1.8/gems/actionpack-3.0.5/lib/action_dispatch/middleware/static.rb:30:in `call'
/Library/Ruby/Gems/1.8/gems/railties-3.0.5/lib/rails/application.rb:168:in `call'
/Library/Ruby/Gems/1.8/gems/railties-3.0.5/lib/rails/application.rb:77:in `send'
/Library/Ruby/Gems/1.8/gems/railties-3.0.5/lib/rails/application.rb:77:in `method_missing'
/Library/Ruby/Gems/1.8/gems/railties-3.0.5/lib/rails/rack/log_tailer.rb:14:in `call'
/Library/Ruby/Gems/1.8/gems/rack-1.2.2/lib/rack/content_length.rb:13:in `call'
/Library/Ruby/Gems/1.8/gems/rack-1.2.2/lib/rack/handler/webrick.rb:52:in `service'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
/Library/Ruby/Gems/1.8/gems/rack-1.2.2/lib/rack/handler/webrick.rb:13:in `run'
/Library/Ruby/Gems/1.8/gems/rack-1.2.2/lib/rack/server.rb:213:in `start'
/Library/Ruby/Gems/1.8/gems/railties-3.0.5/lib/rails/commands/server.rb:65:in `start'
/Library/Ruby/Gems/1.8/gems/railties-3.0.5/lib/rails/commands.rb:30
/Library/Ruby/Gems/1.8/gems/railties-3.0.5/lib/rails/commands.rb:27:in `tap'
/Library/Ruby/Gems/1.8/gems/railties-3.0.5/lib/rails/commands.rb:27
script/rails:6:in `require'
script/rails:6
If I don't add 'gem firewatir' to gemfile, rails server can run,but when run the cucumber command, I get this error:
no such file to load -- firewatir (LoadError)
Anyone ever met this issue,or who know how to fix it? Thanks

I think it is a known (and fixed) problem: Watir and Rails 3.0.X incompatible

I'm not sure that this is the same thing since the stacktrace doesn't include any lines from commonwatir/firewatir. It could be something different, but can't say for sure.

Related

undefined method insert_record for Array

I have a Model A which has many objects of Model B using a :has_many association. When I create a new object of model A, set its attributes, build associated objects and inspect the non-persisted objects, it works fine. However, as soon as I try to persist the objects using save or save!, I am getting the following back-trace.
NoMethodError: undefined method `insert_record' for #<Array:0x000000052541f8>
from /usr/lib/ruby/gems/2.0.0/gems/activerecord-3.0.5/lib/active_record/associations/association_proxy.rb:154:in `send'
from /usr/lib/ruby/gems/2.0.0/gems/activerecord-3.0.5/lib/active_record/autosave_association.rb:306:in `block in save_collection_association'
from /usr/lib/ruby/gems/2.0.0/gems/activerecord-3.0.5/lib/active_record/associations/association_collection.rb:431:in `block in method_missing'
from /usr/lib/ruby/gems/2.0.0/gems/activerecord-3.0.5/lib/active_record/associations/association_proxy.rb:216:in `block in method_missing'
from /usr/lib/ruby/gems/2.0.0/gems/activerecord-3.0.5/lib/active_record/associations/association_proxy.rb:216:in `each'
from /usr/lib/ruby/gems/2.0.0/gems/activerecord-3.0.5/lib/active_record/associations/association_proxy.rb:216:in `method_missing'
from /usr/lib/ruby/gems/2.0.0/gems/activerecord-3.0.5/lib/active_record/associations/association_collection.rb:431:in `method_missing'
from /usr/lib/ruby/gems/2.0.0/gems/activerecord-3.0.5/lib/active_record/autosave_association.rb:297:in `save_collection_association'
from /usr/lib/ruby/gems/2.0.0/gems/activerecord-3.0.5/lib/active_record/autosave_association.rb:163:in `block in add_autosave_association_callbacks'
from /usr/lib/ruby/gems/2.0.0/gems/activesupport-3.0.5/lib/active_support/callbacks.rb:415:in `_run_create_callbacks'
from /usr/lib/ruby/gems/2.0.0/gems/activerecord-3.0.5/lib/active_record/callbacks.rb:281:in `create'
from /usr/lib/ruby/gems/2.0.0/gems/activerecord-3.0.5/lib/active_record/persistence.rb:246:in `create_or_update'
from /usr/lib/ruby/gems/2.0.0/gems/activerecord-3.0.5/lib/active_record/callbacks.rb:277:in `block in create_or_update'
from /usr/lib/ruby/gems/2.0.0/gems/activesupport-3.0.5/lib/active_support/callbacks.rb:418:in `_run_save_callbacks'
from /usr/lib/ruby/gems/2.0.0/gems/activerecord-3.0.5/lib/active_record/callbacks.rb:277:in `create_or_update'
from /usr/lib/ruby/gems/2.0.0/gems/activerecord-3.0.5/lib/active_record/persistence.rb:39:in `save'
... 2 levels...
from /usr/lib/ruby/gems/2.0.0/gems/activerecord-3.0.5/lib/active_record/transactions.rb:240:in `block (2 levels) in save'
from /usr/lib/ruby/gems/2.0.0/gems/activerecord-3.0.5/lib/active_record/transactions.rb:292:in `block in with_transaction_returning_status'
from /usr/lib/ruby/gems/2.0.0/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract/database_statements.rb:139:in `transaction'
from /usr/lib/ruby/gems/2.0.0/gems/activerecord-3.0.5/lib/active_record/transactions.rb:207:in `transaction'
from /usr/lib/ruby/gems/2.0.0/gems/activerecord-3.0.5/lib/active_record/transactions.rb:290:in `with_transaction_returning_status'
from /usr/lib/ruby/gems/2.0.0/gems/activerecord-3.0.5/lib/active_record/transactions.rb:240:in `block in save'
from /usr/lib/ruby/gems/2.0.0/gems/activerecord-3.0.5/lib/active_record/transactions.rb:251:in `rollback_active_record_state!'
from /usr/lib/ruby/gems/2.0.0/gems/activerecord-3.0.5/lib/active_record/transactions.rb:239:in `save'
from (irb):104
from /usr/lib/ruby/gems/2.0.0/gems/railties-3.0.5/lib/rails/commands/console.rb:44:in `start'
from /usr/lib/ruby/gems/2.0.0/gems/railties-3.0.5/lib/rails/commands/console.rb:8:in `start'
from /usr/lib/ruby/gems/2.0.0/gems/railties-3.0.5/lib/rails/commands.rb:23:in `<top (required)>'
from /home/amitav/WMS/trunk/script/rails:6:in `require'
from /home/amitav/WMS/trunk/script/rails:6:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
I am using ruby 2.0.0p195 with rails 3.0.5.
This could be an compatibilityproblem. Update your Rails to a newer version v3.2 >=
Also if you don't want to upgrade your Rails 3.0.x project, make sure you run in on the ruby version where you developed it, e.g. 1.9.2 or 1.9.3.
With rvm or rbenv that should't be a problem.

ruby asin gem search failing on heroku

I've recently moved over from the ruby-aaws gem to asin gem, which is a lot simpler to use and understand. However, I've encountered a really strange issue that's causing search failures for specific queries and only on heroku.
My code is the following:
require 'asin'
client = ASIN::Client.instance
client.search(:Keywords => "Shark Tale", :SearchIndex => :UnboxVideo, :ResponseGroup => :ItemAttributes)
When this runs on my local box, it works perfect without issue. However, when I run this on heroku, I see the following error logs:
REXML::ParseException: #<NoMethodError: undefined method `[]' for nil:NilClass>
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/rexml/parsers/baseparser.rb:340:in `pull_event'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/rexml/parsers/baseparser.rb:183:in `pull'
/app/vendor/bundle/ruby/2.0.0/gems/crack-0.4.0/lib/crack/xml.rb:203:in `parse'
/app/vendor/bundle/ruby/2.0.0/gems/crack-0.4.0/lib/crack/xml.rb:235:in `parse'
/app/vendor/bundle/ruby/2.0.0/gems/asin-1.1.2/lib/asin/client.rb:375:in `call'
/app/vendor/bundle/ruby/2.0.0/gems/asin-1.1.2/lib/asin/client.rb:197:in `search'
(irb):223:in `irb_binding'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb/workspace.rb:86:in `eval'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb/workspace.rb:86:in `evaluate'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb/context.rb:380:in `evaluate'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb.rb:492:in `block (2 levels) in eval_input'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb.rb:624:in `signal_status'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb.rb:489:in `block in eval_input'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb/ruby-lex.rb:247:in `block (2 levels) in each_top_level_statement'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb/ruby-lex.rb:233:in `loop'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb/ruby-lex.rb:233:in `block in each_top_level_statement'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb/ruby-lex.rb:232:in `catch'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb/ruby-lex.rb:232:in `each_top_level_statement'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb.rb:488:in `eval_input'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb.rb:397:in `block in start'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb.rb:396:in `catch'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb.rb:396:in `start'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.8/lib/rails/commands/console.rb:47:in `start'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.8/lib/rails/commands/console.rb:8:in `start'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.8/lib/rails/commands.rb:41:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'
...
Exception parsing
Line: 1
Position: 30315
Last 80 unconsumed characters:
Actor><Actor>Matthew Broderick</Actor><Actor>Patrick Warburton</Actor><Actor>J
from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/rexml/parsers/baseparser.rb:439:in `rescue in pull_event'
from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/rexml/parsers/baseparser.rb:331:in `pull_event'
from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/rexml/parsers/baseparser.rb:183:in `pull'
from /app/vendor/bundle/ruby/2.0.0/gems/crack-0.4.0/lib/crack/xml.rb:203:in `parse'
from /app/vendor/bundle/ruby/2.0.0/gems/crack-0.4.0/lib/crack/xml.rb:235:in `parse'
from /app/vendor/bundle/ruby/2.0.0/gems/asin-1.1.2/lib/asin/client.rb:375:in `call'
from /app/vendor/bundle/ruby/2.0.0/gems/asin-1.1.2/lib/asin/client.rb:197:in `search'
from (irb):223
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.8/lib/rails/commands/console.rb:47:in `start'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.8/lib/rails/commands/console.rb:8:in `start'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.8/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
This fails around 9 out of 10 times on Heroku. I tried a few variations and some of the following variations succeed all the time:
Change the query slightly
client.search(:Keywords => "Shark Tales", :SearchIndex => :UnboxVideo, :ResponseGroup => :ItemAttributes)
Change the ResponseGroup
client.search(:Keywords => "Shark Tale", :SearchIndex => :UnboxVideo, :ResponseGroup => :Offers)
Does anyone know what's causing this?
Realized that the discrepancy between my local box and heroku is with ruby version.
I'm using 1.9.3 on local box whereas my heroku setting is 2.0.0
This is a solution for 2.0.0 from the author of the asin gem
http://asin.herokuapp.com/

Rails 3: uninitialized constant IRB::ReadlineInputMethod::Readline (NameError) in Heroku

Ever since we updated to Rails 3.2.13 we've been unable to start the heroku rails console. The server is working just fine, but when we try to run the console, it gives the following error:
Loading production environment (Rails 3.2.13)
/app/vendor/bundle/ruby/1.9.1/gems/aws-s3-0.6.3/lib/aws/s3/extensions.rb:212:in `const_missing_from_s3_library': uninitialized constant IRB::ReadlineInputMethod::Readline (NameError)
from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/irb/input-method.rb:113:in `gets'
from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/irb.rb:139:in `block (2 levels) in eval_input'
from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/irb.rb:273:in `signal_status'
from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/irb.rb:138:in `block in eval_input'
from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/irb/ruby-lex.rb:188:in `call'
from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/irb/ruby-lex.rb:188:in `buf_input'
from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/irb/ruby-lex.rb:103:in `getc'
from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/irb/slex.rb:205:in `match_io'
from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/irb/slex.rb:75:in `match'
from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/irb/ruby-lex.rb:286:in `token'
from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/irb/ruby-lex.rb:262:in `lex'
from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/irb/ruby-lex.rb:233:in `block (2 levels) in each_top_level_statement'
from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `loop'
from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `block in each_top_level_statement'
from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in `catch'
from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in `each_top_level_statement'
from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/irb.rb:155:in `eval_input'
from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/irb.rb:70:in `block in start'
from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/irb.rb:69:in `catch'
from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/irb.rb:69:in `start'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands/console.rb:47:in `start'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands/console.rb:8:in `start'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
What is going on? Thanks!
Just experienced this myself. As it turns out the rb-readline gem bumped a version that causes rails console, and other things to fail. Try locking it to '~> 0.4.2'.
gem 'rb-readline', '~> 0.4.2'

Unable to run the rails generator for Draper

I'm on Ruby 1.9.3 and Rails 3.0.11. I recently installed Draper(0.12.0) gem, but I'm unable to run its generators. I get the following error when I try to run the generator on the Post model :-
rails generate decorator Post
/home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.11/lib/active_support/whiny_nil.rb:48:in `method_missing': undefined method `config' for nil:NilClass (NoMethodError)
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/draper-0.12.0/lib/draper/railtie.rb:6:in `block in <class:Railtie>'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.11/lib/rails/railtie.rb:189:in `call'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.11/lib/rails/railtie.rb:189:in `each'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.11/lib/rails/railtie.rb:189:in `load_generators'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.11/lib/rails/application.rb:147:in `block in load_generators'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.11/lib/rails/application/railties.rb:11:in `each'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.11/lib/rails/application/railties.rb:11:in `all'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.11/lib/rails/application.rb:147:in `load_generators'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.11/lib/rails/generators.rb:319:in `load_generators_from_railties!'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.11/lib/rails/generators.rb:278:in `lookup'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.11/lib/rails/generators.rb:141:in `find_by_namespace'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.11/lib/rails/generators.rb:161:in `invoke'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.11/lib/rails/commands/generate.rb:10:in `<top (required)>'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.11/lib/active_support/dependencies.rb:239:in `require'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.11/lib/active_support/dependencies.rb:239:in `block in require'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.11/lib/active_support/dependencies.rb:225:in `block in load_dependency'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.11/lib/active_support/dependencies.rb:593:in `new_constants_in'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.11/lib/active_support/dependencies.rb:225:in `load_dependency'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.11/lib/active_support/dependencies.rb:239:in `require'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.11/lib/rails/commands.rb:17:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Any inputs, on how can I debug this would be really helpful.
Thank you.
The Problem is this section in v0.12.0 (the one you are using) https://github.com/drapergem/draper/blob/v0.12.0/lib/draper/railtie.rb#L5-L8
When I look at the master branch they changed to code to look like: https://github.com/drapergem/draper/blob/master/lib/draper/railtie.rb#L5-L10
You should upgrade your draper gem to the latest release and see if the error still occurs.

devise generating views error

I've got a problem with devise gem, when I enter rails generate devise:install command there is an error:
/home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/inflector/methods.rb:124:in `block in constantize': unin
itialized constant View (NameError)
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/inflector/methods.rb:123:in `each'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/inflector/methods.rb:123:in `constantize'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/core_ext/string/inflections.rb:43:in `const
antize'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/devise-1.1.rc1/lib/devise/mapping.rb:87:in `to'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/devise-1.1.rc1/lib/devise/mapping.rb:80:in `modules'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/devise-1.1.rc1/lib/devise/mapping.rb:93:in `strategies'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/devise-1.1.rc1/lib/devise.rb:166:in `register'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/devise-1.1.rc1/lib/devise/rails/routes.rb:92:in `block in devise_for'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/devise-1.1.rc1/lib/devise/rails/routes.rb:91:in `each'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/devise-1.1.rc1/lib/devise/rails/routes.rb:91:in `devise_for'
from /home/ofca/Praca/inzynierka/config/routes.rb:2:in `block in <top (required)>'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.1/lib/action_dispatch/routing/route_set.rb:258:in `instance_exec'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.1/lib/action_dispatch/routing/route_set.rb:258:in `eval_block'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.1/lib/action_dispatch/routing/route_set.rb:235:in `draw'
from /home/ofca/Praca/inzynierka/config/routes.rb:1:in `<top (required)>'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application/routes_reloader.rb:29:in `block in load_paths
'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application/routes_reloader.rb:29:in `each'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application/routes_reloader.rb:29:in `load_paths'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application/routes_reloader.rb:13:in `reload!'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application/routes_reloader.rb:7:in `block in initialize'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/file_update_checker.rb:32:in `call'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/file_update_checker.rb:32:in `execute_if_up
dated'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application/finisher.rb:63:in `block (2 levels) in <modul
e:Finisher>'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application/finisher.rb:64:in `call'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application/finisher.rb:64:in `block in <module:Finisher>
'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `instance_exec'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `run'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `each'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `run_initializers'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application.rb:96:in `initialize!'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/ofca/Praca/inzynierka/config/environment.rb:5:in `<top (required)>'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application.rb:83:in `require'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application.rb:83:in `require_environment!'
from /home/ofca/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/commands.rb:22:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I'm using Rails 3.1.1 and Ruby 1.9.2p290 (2011-07-09 revision 32553) on Linux. And db is postgres.
Here is the line mentioned in the first line of the error log:
constant = constant.const_defined?(name, false) ? constant.const_get(name) : constant.const_missing(name)
Oh, and I tried other combinations of this command: rails generate devise:install, rails g devise_install and it gives me the same effect
You are using a very old version of Devise that is not even meant to be used in production (it is a release candidate!). Please update your Devise version.
solution: add to gemfile:
gem 'devise', :git => 'git://github.com/plataformatec/devise.git'