Rails新项目rspec:安装错误

时间:2014-09-06 15:26:11

标签: ruby-on-rails ruby project

在安装rspec:install时,我遇到了这个问题并且无法解决它。你们认为它们是什么因为???

$ rails generate rspec:install
c:/Users/Samuel/Documents/Aptana Studio 3 Workspace/sample_app/config/environments/development.rb:1:in `<top (required)>': undefined method `
configure' for #<SampleApp::Application:0x37ca508> (NoMethodError)
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `block in req
uire'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:214:in `load_depende
ncy'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.8/lib/rails/engine.rb:591:in `block (2 levels) in <class:Engin
e>'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.8/lib/rails/engine.rb:590:in `each'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.8/lib/rails/engine.rb:590:in `block in <class:Engine>'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.8/lib/rails/initializable.rb:30:in `instance_exec'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.8/lib/rails/initializable.rb:30:in `run'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.8/lib/rails/initializable.rb:55:in `block in run_initializers'

        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:150:in `block in tsort_each'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:210:in `block (2 levels) in each_strongly_connected_component_from'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:219:in `each_strongly_connected_component_from'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:209:in `block in each_strongly_connected_component_from'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.8/lib/rails/initializable.rb:44:in `each'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.8/lib/rails/initializable.rb:44:in `tsort_each_child'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:203:in `each_strongly_connected_component_from'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:182:in `block in each_strongly_connected_component'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:180:in `each'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:180:in `each_strongly_connected_component'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:148:in `tsort_each'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.8/lib/rails/initializable.rb:54:in `run_initializers'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.8/lib/rails/application.rb:215:in `initialize!'
        from c:/Users/Samuel/Documents/Aptana Studio 3 Workspace/sample_app/config/environment.rb:5:in `<top (required)>'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.8/lib/rails/application.rb:189:in `require'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.8/lib/rails/application.rb:189:in `require_environment!'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.8/lib/rails/commands.rb:44:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'

发展内容.rb是

Rails.application.configure做   #此处指定的设置将优先于config / application.rb中的设置。

#在开发环境中重新加载应用程序的代码   #每个请求。这会减慢响应时间,但非常适合开发   #因为您在进行代码更改时不必重新启动Web服务器。   config.cache_classes = false

#不要急于在启动时加载代码。   config.eager_load = false

#显示完整的错误报告并禁用缓存。   config.consider_all_requests_local = true   config.action_controller.perform_caching = false

#不在乎邮件是否无法发送。   config.action_mailer.raise_delivery_errors = false

#将弃用通知发送到Rails记录器。   config.active_support.deprecation =:log

#如果有待处理的迁移,则在页面加载时引发错误。   config.active_record.migration_error =:page_load

#Debug mode禁用资产的连接和预处理。   #此选项可能会导致视图渲染显着延迟   #复杂资产数量。   config.assets.debug = true

#在运行时提供资产时添加其他错误检查。   #检查未正确声明的链轮依赖项。   #引发有用的错误消息。   config.assets.raise_runtime_errors = true

#引发缺失翻译的错误   #config.action_view.raise_on_missing_translations = true 端

0 个答案:

没有答案