由于我安装了 better_errors gem,我无法使用命令 rails 服务器启动我的服务器。我曾尝试在我的 development.rb 中添加行,例如BetterErrors::Middleware.allow_ip! "0.0.0.0/0"
orBetterErrors::Middleware.allow_ip! ENV['TRUSTED_IP'] if ENV['TRUSTED_IP']
但它没有用。这是我尝试启动服务器时的错误消息:
/home/jakub/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/better_errors-2.1.1/lib/better_errors/exception_extension.rb:6:in `caller_locations': stack level too deep (SystemStackError)
from /home/jakub/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/better_errors-2.1.1/lib/better_errors/exception_extension.rb:6:in `set_backtrace'
from /home/jakub/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/web-console-2.0.0.beta3/lib/web_console/exception_extension.rb:15:in `call'
from /home/jakub/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/web-console-2.0.0.beta3/lib/web_console/exception_extension.rb:15:in `block in <class:Exception>'
from /home/jakub/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/better_errors-2.1.1/lib/better_errors/exception_extension.rb:10:in `set_backtrace'
from /home/jakub/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/web-console-2.0.0.beta3/lib/web_console/exception_extension.rb:15:in `call'
from /home/jakub/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/web-console-2.0.0.beta3/lib/web_console/exception_extension.rb:15:in `block in <class:Exception>'
from /home/jakub/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/better_errors-2.1.1/lib/better_errors/exception_extension.rb:10:in `set_backtrace'
from /home/jakub/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/web-console-2.0.0.beta3/lib/web_console/exception_extension.rb:15:in `call'
... 5885 levels...
from /home/jakub/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
还有我的gemfile:
source 'https://rubygems.org'
gem 'rails', '4.2.2'
gem 'bcrypt', '3.1.7'
gem "paperclip",
git: "git://github.com/thoughtbot/paperclip.git"
gem 'faker', '1.4.2'
gem 'will_paginate', '3.0.7'
gem 'bootstrap-will_paginate', '0.0.10'
gem 'sass-rails', '5.0.2'
gem 'uglifier', '2.5.3'
gem 'coffee-rails', '4.1.0'
gem 'jquery-rails', '4.0.3'
gem 'turbolinks', '2.3.0'
gem 'jbuilder', '2.2.3'
gem 'sdoc', '0.4.0', group: :doc
group :development, :test do
gem 'better_errors', '~> 2.1.1'
gem 'sqlite3', '1.3.9'
gem 'byebug', '3.4.0'
gem 'web-console', '2.0.0.beta3'
gem 'spring', '1.1.3'
end
group :test do
gem 'minitest-reporters', '1.0.5'
gem 'mini_backtrace', '0.1.3'
gem 'guard-minitest', '2.3.1'
end
group :production do
gem 'pg', '0.17.1'
gem 'rails_12factor', '0.0.2'
end