how to use gem generator carter rails - ruby-on-rails

I'm trying to use the carter gem for my rails project. How do I use the gem to generate its pre-made controllers, views, and models? There is no documentation for carter, so my attempt was to try rails g carter and rails g carter:install, both of which returned the following:
/home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require': cannot load such file -- state_machine (LoadError)
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/carter-0.7.2/lib/carter/state_machine.rb:1:in `<top (required)>'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/carter-0.7.2/lib/carter.rb:6:in `<top (required)>'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /home/hermes/coding/rails/seniorshub/config/application.rb:7:in `<top (required)>'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:44:in `require'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:44:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
So two questions: Were my commands the correct ones, and if so, then how do I begin solving the above error (and what is the above error? Dependencies?) ? If my commands were not correct, then what is the correct way of generating M's and V's and C's from a gem, specifically carter?

I know this is getting a bit off course, but you really don't want a gem that hasn't been touched in two years.
Consider the follwing instead:
Spree
ror_ecommerce
Paying for Shopify

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.

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

Bundler.require fails in clean Rails project

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.

deprecated_mass_assignment_security.rb:14:in `attr_accessible' [voting gem][rails 4]

So, when running
[leap_staging]$rails g reputation_system
After including the gem 'activerecord-reputation-system', require: 'reputation_system' in my Gemfile I get the below error:
/usr/local/rvm/gems/ruby-2.0.0-p195/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-p195/gems/activerecord-reputation-system-2.0.2/lib/reputation_system/models/evaluation.rb:25:in `<class:Evaluation>'
from /usr/local/rvm/gems/ruby-2.0.0-p195/gems/activerecord-reputation-system-2.0.2/lib/reputation_system/models/evaluation.rb:18:in `<module:ReputationSystem>'
from /usr/local/rvm/gems/ruby-2.0.0-p195/gems/activerecord-reputation-system-2.0.2/lib/reputation_system/models/evaluation.rb:17:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.0.0-p195/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /usr/local/rvm/gems/ruby-2.0.0-p195/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
from /usr/local/rvm/gems/ruby-2.0.0-p195/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from /usr/local/rvm/gems/ruby-2.0.0-p195/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /usr/local/rvm/gems/ruby-2.0.0-p195/gems/activerecord-reputation-system-2.0.2/lib/reputation_system.rb:25:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.0.0-p195#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /usr/local/rvm/gems/ruby-2.0.0-p195#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /usr/local/rvm/gems/ruby-2.0.0-p195#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /usr/local/rvm/gems/ruby-2.0.0-p195#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /usr/local/rvm/gems/ruby-2.0.0-p195#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /usr/local/rvm/gems/ruby-2.0.0-p195#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /usr/local/rvm/gems/ruby-2.0.0-p195#global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /Users/apane/Downloads/leap_staging/leap_staging/config/application.rb:7:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.0.0-p195/gems/railties-4.0.0/lib/rails/commands.rb:44:in `require'
from /usr/local/rvm/gems/ruby-2.0.0-p195/gems/railties-4.0.0/lib/rails/commands.rb:44:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
It's clear to me that this had to with Rails 4 and the new Strong Params. However, I'd like to get this workin'. So, how can I get this to work or convert it to strong_params if I can't even generate the files?
See the full app here if necessary for easy troubleshooting: www.github.com/apane/leap (gem not included)
Have you tried adding the protected_attributes Gem into your Gemfile like the message says?
activerecord-reputation-system gem now supports Rails 4 (since version 3.0).

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