Bundler.require fails in clean Rails project - ruby-on-rails

My rails app fails to load when I have the following line in application.rb:
Bundler.require(:default, Rails.env)
I get the following error:
.rvm/gems/ruby-2.0.0-p353#global/gems/railties-4.0.2/lib/rails/initializable.rb:13:in `[]': no implicit conversion of Symbol into Integer (TypeError)
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/railties-4.0.2/lib/rails/initializable.rb:13:in `initialize'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/railties-4.0.2/lib/rails/initializable.rb:85:in `new'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/railties-4.0.2/lib/rails/initializable.rb:85:in `initializer'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#rails-4.0/gems/rolify-3.3.0/lib/rolify/railtie.rb:6:in `<class:Railtie>'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#rails-4.0/gems/rolify-3.3.0/lib/rolify/railtie.rb:5:in `<module:Rolify>'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#rails-4.0/gems/rolify-3.3.0/lib/rolify/railtie.rb:4:in `<top (required)>'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#rails-4.0/gems/rolify-3.3.0/lib/rolify.rb:1:in `<top (required)>'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:76:in `require'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:72:in `each'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:72:in `block in require'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:61:in `each'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:61:in `require'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler.rb:131:in `require'
from /Users/gerardkelly/Web Development/Rails Apps/Rails 4/po-app/config/application.rb:5:in `<top (required)>'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/railties-4.0.2/lib/rails/commands.rb:74:in `require'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/railties-4.0.2/lib/rails/commands.rb:74:in `block in <top (required)>'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/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>'
Looks as though it's complaining about the params being sent in - which is odd because this is pre-baked Rails stuff. Note that the Bundler.require is application.rb:5 which its complaining about.
I'm on Rails 4, Ruby 2.0.0

Looks like the rollify gem you are using (so it's not clean rails project :P) has some issues in rails 4.x series.
Check this out: https://github.com/EppO/rolify/pull/218 there is a fork that already fixes that.

Related

Error with rails server

yahya#pc ~/RubymineProjects/depot $ rails server
/home/yahya/.rvm/gems/ruby-2.2.3/gems/activesupport-3.1.3/lib/active_support/values/time_zone.rb:268: warning: circular argument reference - now
/home/yahya/.rvm/gems/ruby-2.2.3/gems/capistrano-2.15.7/lib/capistrano/configuration/loading.rb:18:in `instance': Please require this file from within a Capistrano recipe (LoadError)
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/rvm-capistrano-1.5.6/lib/rvm/capistrano/helpers/base.rb:16:in `rvm_with_capistrano'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/rvm-capistrano-1.5.6/lib/rvm/capistrano/helpers/_cset.rb:3:in `<top (required)>'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/rvm-capistrano-1.5.6/lib/rvm/capistrano/base.rb:1:in `require'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/rvm-capistrano-1.5.6/lib/rvm/capistrano/base.rb:1:in `<top (required)>'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/rvm-capistrano-1.5.6/lib/rvm/capistrano/selector.rb:1:in `require'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/rvm-capistrano-1.5.6/lib/rvm/capistrano/selector.rb:1:in `<top (required)>'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/rvm-capistrano-1.5.6/lib/rvm/capistrano.rb:3:in `require'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/rvm-capistrano-1.5.6/lib/rvm/capistrano.rb:3:in `<top (required)>'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/bundler-1.12.0.pre.1/lib/bundler/runtime.rb:92:in `require'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/bundler-1.12.0.pre.1/lib/bundler/runtime.rb:92:in `rescue in block in require'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/bundler-1.12.0.pre.1/lib/bundler/runtime.rb:69:in `block in require'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/bundler-1.12.0.pre.1/lib/bundler/runtime.rb:62:in `each'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/bundler-1.12.0.pre.1/lib/bundler/runtime.rb:62:in `require'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/bundler-1.12.0.pre.1/lib/bundler.rb:102:in `require'
from /home/yahya/RubymineProjects/depot/config/application.rb:7:in `<top (required)>'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/railties-3.1.3/lib/rails/commands.rb:52:in `require'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/railties-3.1.3/lib/rails/commands.rb:52:in `block in <top (required)>'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/railties-3.1.3/lib/rails/commands.rb:49:in `tap'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/railties-3.1.3/lib/rails/commands.rb:49:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
It used to work but all of sudden, I got this.
It used to work but all of sudden, I got this.
That's unlikely.
Apparently, you've updated your version of Ruby since the last time you ran your Rails application. The solution is to revert Ruby to whatever version you used when you built your Rails app, or to bring both Rails and Ruby to a current and mutually compatible version.

Getting error while running rails server

I am migrating my web app to Microsoft Azure. When I do rails s, I am getting this log:
/home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.0.0/lib/active_support/values/time_zone.rb:282: warning: circular argument reference - now
/home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/puppet-3.7.3/lib/puppet/defaults.rb:465: warning: duplicated key at line 466 ignored: :queue_type
/home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml/syck_node_monkeypatch.rb:42:in `<top (required)>': uninitialized constant Syck (NameError)
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb:197:in `<module:YAML>'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb:132:in `<top (required)>'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/puppet-3.7.3/lib/puppet/vendor/require_vendored.rb:4:in `<top (required)>'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/puppet-3.7.3/lib/puppet/vendor.rb:40:in `require_libs'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/puppet-3.7.3/lib/puppet/vendor.rb:53:in `load_vendored'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/puppet-3.7.3/lib/puppet.rb:172:in `<module:Puppet>'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/puppet-3.7.3/lib/puppet.rb:29:in `<top (required)>'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.0/lib/bundler/runtime.rb:76:in `require'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.0/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.0/lib/bundler/runtime.rb:72:in `each'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.0/lib/bundler/runtime.rb:72:in `block in require'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.0/lib/bundler/runtime.rb:61:in `each'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.0/lib/bundler/runtime.rb:61:in `require'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.0/lib/bundler.rb:133:in `require'
from /home/mnpatel0611/mapial-stage/mapial/config/application.rb:7:in `<top (required)>'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in <top (required)>'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Anyone face this error?
Puppatlabs describe that Puppet 3.7.3 is not supported on Ruby 2.2 but now thay change status to resolved. So you should go more into this and find rid of this problem. You can show this issue from puppatlabs ticket Puppet 3.7.3 is not supported on Ruby 2.2

Superclass mismatch for class MultiBox (TypeError)

I'm trying to update a Ruby/Rails app to Rails 4.2. After updating gems, I get a superclass mismatch for class MultiBox error. There's no local definition of class MultiBox in the code. It's a single code base (no git merge issues). This happens locally on my machine, though it's a heroku-deployed app, which is where the other situations occurred. I get the same error with an older version of prawn-layout (0.7.2). I appreciate any ideas here.
$ rails server
/var/lib/gems/2.2.0/gems/prawn-layout-0.8.4/lib/prawn/layout/grid.rb:191:in `<class:Document>': superclass mismatch for class MultiBox (TypeError)
from /var/lib/gems/2.2.0/gems/prawn-layout-0.8.4/lib/prawn/layout/grid.rb:2:in `<module:Prawn>'
from /var/lib/gems/2.2.0/gems/prawn-layout-0.8.4/lib/prawn/layout/grid.rb:1:in `<top (required)>'
from /var/lib/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /var/lib/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
from /var/lib/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from /var/lib/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /var/lib/gems/2.2.0/gems/prawn-layout-0.8.4/lib/prawn/layout.rb:3:in `<top (required)>'
from /var/lib/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/runtime.rb:85:in `require'
from /var/lib/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/runtime.rb:85:in `rescue in block in require'
from /var/lib/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/runtime.rb:68:in `block in require'
from /var/lib/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/runtime.rb:61:in `each'
from /var/lib/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/runtime.rb:61:in `require'
from /var/lib/gems/2.2.0/gems/bundler-1.8.5/lib/bundler.rb:134:in `require'
from /home/paul/cvtg/config/application.rb:7:in `<top (required)>'
from /var/lib/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `require'
from /var/lib/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from /var/lib/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /var/lib/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
from /var/lib/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /var/lib/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
A friend found the answer: the prawn-layout gem is now deprecated, and its functionality has been consolidated into the prawn gem. Since our Gemfile was requiring both gems, we got the 'superclass mismatch for class MultiBox' error. Removing the gem declaration for prawn-layout eliminates the error.

routing-filter does not work on rails 4

I am trying to convert ?locale=en in routes to /en/ I found routing-filter gem
but if I try to run rails, I get this error:
samir#samir-VirtualBox:~/RubymineProjects/dcaclab$ rails s
/home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require': cannot load such file -- routing_filter/adapters/rails_4 (LoadError)
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `block in require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:214:in `load_dependency'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/routing-filter-0.3.1/lib/routing_filter.rb:27:in `<top (required)>'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `block in require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:214:in `load_dependency'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/routing-filter-0.3.1/lib/routing-filter.rb:1:in `<top (required)>'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in `require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in `each'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in `block in require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in `each'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in `require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/bundler-1.5.3/lib/bundler.rb:131:in `require'
from /home/samir/RubymineProjects/dcaclab/config/application.rb:8:in `<top (required)>'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/railties-4.0.3/lib/rails/commands.rb:74:in `require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/railties-4.0.3/lib/rails/commands.rb:74:in `block in <top (required)>'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/railties-4.0.3/lib/rails/commands.rb:71:in `tap'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/railties-4.0.3/lib/rails/commands.rb:71:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Any idea how to solve this?
The version of the gem you are currently using is probably not compatible with Rails 4. You need to have version 0.4.0.pre, which can be installed through gem install routing-filter --pre or by editing your gemfile. I have found this issue, which relates to your problem: https://github.com/svenfuchs/routing-filter/issues/48

undefined method class_inheritable_accessor for ActiveRecord::Extensions::SqliteRegexp:Class

Ive recently install the 'ar-extension' gem. After installation when i run rails c or rails s i gets the following error :
/usr/local/rvm/gems/ruby-1.9.2-p320/gems/ar-extensions-0.9.2/lib/ar-extensions/extensions.rb:427:in `<class:SqliteRegexp>': undefined method `class_inheritable_accessor' for ActiveRecord::Extensions::SqliteRegexp:Class (NoMethodError)
from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/ar-extensions-0.9.2/lib/ar-extensions/extensions.rb:426:in `<module:Extensions>'
from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/ar-extensions-0.9.2/lib/ar-extensions/extensions.rb:112:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `block in require'
from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/ar-extensions-0.9.2/init.rb:10:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `block in require'
from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/ar-extensions-0.9.2/lib/ar-extensions.rb:5:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p320#global/gems/bundler-1.1.4/lib/bundler/runtime.rb:68:in `require'
from /usr/local/rvm/gems/ruby-1.9.2-p320#global/gems/bundler-1.1.4/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /usr/local/rvm/gems/ruby-1.9.2-p320#global/gems/bundler-1.1.4/lib/bundler/runtime.rb:66:in `each'
from /usr/local/rvm/gems/ruby-1.9.2-p320#global/gems/bundler-1.1.4/lib/bundler/runtime.rb:66:in `block in require'
from /usr/local/rvm/gems/ruby-1.9.2-p320#global/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in `each'
from /usr/local/rvm/gems/ruby-1.9.2-p320#global/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in `require'
from /usr/local/rvm/gems/ruby-1.9.2-p320#global/gems/bundler-1.1.4/lib/bundler.rb:119:in `require'
from /home/infibeam/Aptana_studio_3/workspace/DigitalAssetManagement/config/application.rb:7:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.6/lib/rails/commands.rb:53:in `require'
from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.6/lib/rails/commands.rb:53:in `block in <top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.6/lib/rails/commands.rb:50:in `tap'
from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.6/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I've google for the error but in vain..Plz help me to know what xactly is going wrong.
The gem you're trying to use is not compatible with rails 3.2. class_inheritable_accessor has been deprecated in favor of class_attribute.
You can look for rails 3.2 fork of this gem, do your own port, or search for substitutes.
actually ar-extensions doesnt work with rails3 for rails 3 we have active import as the alternative and it works absolutely fine..;)
Please use a activerecord-import gem for rails 3
https://github.com/zdennis/activerecord-import/wiki
books = []
10.times do |i|
books "book #{i}")
end
Book.import books

Resources