我在使用 ActiveScaffold 和 Rails 4 时遇到了一个非常奇怪的错误。我创建了一个全新的项目,运行“rake db:create”和“bundle install”,然后将 gem active_scaffold 添加到我的 gem 文件中并再次运行“bundle install” . 此时一切正常。
然后,当我尝试输入时:
rails g active_scaffold Test test:string
我得到:
/Users/rgrzesik/.rvm/gems/ruby-2.0.0-p247/gems/active_scaffold-3.2.20/lib/active_scaffold.rb:2:in `<top (required)>': This version of ActiveScaffold requires Rails 3.1 or higher. Please use an earlier version. (RuntimeError)
from /Users/rgrzesik/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /Users/rgrzesik/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /Users/rgrzesik/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /Users/rgrzesik/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /Users/rgrzesik/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /Users/rgrzesik/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /Users/rgrzesik/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /Users/rgrzesik/Documents/Rails_Projects/FingertipFormulary/config/application.rb:7:in `<top (required)>'
from /Users/rgrzesik/.rvm/gems/ruby-2.0.0-p247@global/gems/railties-4.0.0/lib/rails/commands.rb:44:in `require'
from /Users/rgrzesik/.rvm/gems/ruby-2.0.0-p247@global/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>'
是什么赋予了?我正在运行 Rails 4,它远远超出了 Rails 3.1。有任何想法吗?