bullet: Uninitialized constant Bullet
Hi,
I am working on Rails 4.0.0 and Ruby 2.1.2-p95, in my development section of Gemfile I added
gem 'bullet'
And in the config/environments/development.rb I had the following code:
config.after_initialize do
Bullet.enable = true
Bullet.alert = true
Bullet.bullet_logger = true
Bullet.console = true
Bullet.rails_looger = true
end
I restart my server and I get Uninitialized constant Bullet and my development server crashes. Can you please help me with this issue?
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 2
- Comments: 21 (6 by maintainers)
same problem to use Bullet with Rspec…
was solved moving
to rspec/rails_helper.rb, inside RSpec.configure block
same here.
Update: The bullet gem was setting to development in my Gemfile, but not to test.
I had this issue and to solve it i’ve followed the solution indicated here: https://stackoverflow.com/a/50813770/8479614
@RafaelPrallon’s solution worked for me - loading from
rails_helper.rbstill results in an error without it.ok, I updated README to put code to
rails_helper.rbProblem
I encountered the same problem when deploy with capistrano 3.5.0
Then I check
bundle list | grep bulletand found it was not installed.Then I was wondering wether capistano bundle does not install development group gems and I found this.
https://github.com/capistrano/bundler
Solution
So what I need to do is make sure capistrano install gems in development group.
Just for people who may have the same problem as me!