rails_12factor关于部署的gem问题

时间:2013-06-21 14:48:29

标签: ruby-on-rails exception localhost

我在localhost:3000上加载了rails服务器,我收到了以下错误。我发现导致这个问题的是'rails_12factor'宝石。我正在使用这个gem让我的css在我的herokuapp上运行,但它在localhost上引起了问题。有没有办法让rails_12factor在本地工作?

我正在运行rails 4.0 / ruby​​ 2.0,我听说我需要'rails_12factor'才能让css与rails 4和heroku一起工作..

这是错误:

    wrong number of arguments (0 for 1)

Rails.root: /home/brice/rails_projects/blog

Application Trace | Framework Trace | Full Trace
activesupport (4.0.0.rc1) lib/active_support/core_ext/kernel/reporting.rb:82:in `capture'
activerecord (4.0.0.rc1) lib/active_record/migration.rb:363:in `call'
actionpack (4.0.0.rc1) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.0.0.rc1) lib/active_support/callbacks.rb:392:in `_run__553013214532738530__call__callbacks'
activesupport (4.0.0.rc1) lib/active_support/callbacks.rb:80:in `run_callbacks'
actionpack (4.0.0.rc1) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.0.0.rc1) lib/action_dispatch/middleware/reloader.rb:64:in `call'
actionpack (4.0.0.rc1) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
actionpack (4.0.0.rc1) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
actionpack (4.0.0.rc1) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.0.0.rc1) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.0.0.rc1) lib/rails/rack/logger.rb:21:in `block in call'
activesupport (4.0.0.rc1) lib/active_support/tagged_logging.rb:67:in `block in tagged'
activesupport (4.0.0.rc1) lib/active_support/tagged_logging.rb:25:in `tagged'
activesupport (4.0.0.rc1) lib/active_support/tagged_logging.rb:67:in `tagged'
railties (4.0.0.rc1) lib/rails/rack/logger.rb:21:in `call'
actionpack (4.0.0.rc1) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
activesupport (4.0.0.rc1) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
actionpack (4.0.0.rc1) lib/action_dispatch/middleware/static.rb:64:in `call'
railties (4.0.0.rc1) lib/rails/engine.rb:511:in `call'
railties (4.0.0.rc1) lib/rails/application.rb:96:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
rack (1.5.2) lib/rack/content_length.rb:14:in `call'
rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
/home/brice/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
/home/brice/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
/home/brice/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'

我也可以提供其他文件,但我不知道在哪里看。如果有人知道如何解决这个问题,我将非常感激!

1 个答案:

答案 0 :(得分:0)

答案是将'group :: production'附加到rails_12factor

的末尾

所以它在你的gemfile上看起来像这样:

gem 'rails_12factor', group: :production