我将 Better Errors gem 添加到我的 gemfile 中,如下面的 gemfile 所示,然后运行 bundle 并Using better_errors 1.1.0
多次查看并重新启动我的服务器。我观看了有关如何安装它的 railscast 剧集。过去我从来没有遇到过安装任何其他 gem 的问题(我是编程新手)。我阅读了文档,并且已经对此进行了检查:
Note: If you discover that Better Errors isn't working - particularly after upgrading from version 0.5.0 or less - be sure to set config.consider_all_requests_local = true in config/environments/development.rb.
任何关于如何让这个宝石工作的想法将不胜感激!这是我的宝石文件:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.5'
group :development, :test do
gem 'rspec-rails'
gem 'capybara'
end
# Use sqlite3 as the database for Active Record
group :production do
gem 'pg'
gem 'rails_12factor'
end
group :development do
gem 'sqlite3'
gem 'better_errors'
end
gem 'bootstrap-sass', '~> 3.1.1'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.2'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
# Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'