How to disable detailed console in Ruby on Rails? - ruby-on-rails-4

When I use console for RoR and there is an error I get the list of gems/libs used, for example
SyntaxError: /Users/user/Sites/Jobsite/app/models/subject.rb:11: syntax error, unexpected ']', expecting ')'
where(["name LIKE ?"], "%#{query}%"])
^
from /Users/user/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:443:in `load'
from /Users/user/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:443:in `block in load_file'
from /Users/user/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:633:in `new_constants_in'
from /Users/user/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:442:in `load_file'
from /Users/user/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:342:in `require_or_load'
from /Users/user/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:480:in `load_missing_constant'
from /Users/user/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:180:in `const_missing'
from (irb):1
from /Users/user/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.1.0/lib/rails/commands/console.rb:90:in `start'
from /Users/user/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.1.0/lib/rails/commands/console.rb:9:in `start'
from /Users/user/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:69:in `console'
from /Users/user/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /Users/user/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.1.0/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/user/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
from /Users/user/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `block in require'
from /Users/user/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:232:in `load_dependency'
from /Users/user/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
from /Users/user/Sites/Jobsite/bin/rails:8:in `<top (required)>'
from /Users/user/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:241:in `load'
from /Users/user/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:241:in `block in load'
from /Users/user/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:232:in `load_dependency'
from /Users/user/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:241:in `load'
from /Users/user/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/user/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
Do I really need this or can I disable it somehow, because each time I get this, I need to scroll up and I don't see the error message itself so easily.

You could try changing the log level.
You can also turn off the SQL logging by putting this in an initializer:
ActiveRecord::Base.logger = nil
Maybe something like - config/initializers/activerecord_logger.rb
More info here - Disable Rails SQL logging in console

You can change the setting consider_all_requests_local from true to false in config/environments/development.rb so it doesn't show the stacktrace:
Jobsite::Application.configure do
config.consider_all_requests_local = false
end

Related

undefined method 'pool' for Sidetiq::Supervisor:Class

I am working on a rails application. On running command bundle exec sidekiq I am getting the following error -
undefined method `pool' for Sidetiq::Supervisor:Class
/.rvm/gems/ruby-2.6.3/gems/sidetiq-0.6.0/lib/sidetiq/supervisor.rb:12:in `<class:Supervisor>'
/.rvm/gems/ruby-2.6.3/gems/sidetiq-0.6.0/lib/sidetiq/supervisor.rb:2:in `<module:Sidetiq>'
/.rvm/gems/ruby-2.6.3/gems/sidetiq-0.6.0/lib/sidetiq/supervisor.rb:1:in `<top (required)>'
/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `require'
/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `block in require'
/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:240:in `load_dependency'
/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `require'
/.rvm/gems/ruby-2.6.3/gems/sidetiq-0.6.0/lib/sidetiq.rb:32:in `<top (required)>'
/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `require'
/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `block in require'
/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:240:in `load_dependency'
/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `require'
/application/engines/common/lib/common/engine.rb:17:in `<top (required)>'
/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `require'
/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `block in require'
/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:240:in `load_dependency'
/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `require'
/application/engines/common/lib/common.rb:1:in `<top (required)>'
/.rvm/gems/ruby-2.6.3/gems/bundler-2.2.15/lib/bundler/runtime.rb:66:in `require'
/.rvm/gems/ruby-2.6.3/gems/bundler-2.2.15/lib/bundler/runtime.rb:66:in `block (2 levels) in require'
/.rvm/gems/ruby-2.6.3/gems/bundler-2.2.15/lib/bundler/runtime.rb:61:in `each'
/.rvm/gems/ruby-2.6.3/gems/bundler-2.2.15/lib/bundler/runtime.rb:61:in `block in require'
/.rvm/gems/ruby-2.6.3/gems/bundler-2.2.15/lib/bundler/runtime.rb:50:in `each'
/.rvm/gems/ruby-2.6.3/gems/bundler-2.2.15/lib/bundler/runtime.rb:50:in `require'
/.rvm/gems/ruby-2.6.3/gems/bundler-2.2.15/lib/bundler.rb:173:in `require'
/application/config/application.rb:17:in `<top (required)>'
/.rvm/gems/ruby-2.6.3/gems/sidekiq-4.1.4/lib/sidekiq/cli.rb:232:in `require'
/.rvm/gems/ruby-2.6.3/gems/sidekiq-4.1.4/lib/sidekiq/cli.rb:232:in `boot_system'
/.rvm/gems/ruby-2.6.3/gems/sidekiq-4.1.4/lib/sidekiq/cli.rb:50:in `run'
/.rvm/gems/ruby-2.6.3/gems/sidekiq-4.1.4/bin/sidekiq:12:in `<top (required)>'
/.rvm/gems/ruby-2.6.3/bin/sidekiq:23:in `load'
/.rvm/gems/ruby-2.6.3/bin/sidekiq:23:in `<main>'
/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:22:in `eval'
/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:22:in `<main>'
It is pointing towards this piece of code in the first line of trace -
if Sidekiq.server?
if handler_pool_size = Sidetiq.config.handler_pool_size
pool Sidetiq::Actor::Handler,
as: :sidetiq_handler,
size: handler_pool_size
else
# Use Celluloid's CPU-based default.
pool Sidetiq::Actor::Handler,
as: :sidetiq_handler
end
end
I am not able to find out the root of this error.
Is there any gem that I am missing?
Does anyone has any idea how to resolve this issue?
Please help! Its important!

Error while laucnch a new ec2 instance by using chef workstation

/opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/mixlib-cli-1.7.0/lib/mixlib/cli.rb:230:in `parse_options': ambiguous option: --ssh (OptionParser::AmbiguousOption)
from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.6.4/lib/chef/knife.rb:323:in `parse_options'
from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.6.4/lib/chef/knife.rb:303:in `initialize'
from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.6.4/lib/chef/knife.rb:217:in `new'
from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.6.4/lib/chef/knife.rb:217:in `run'
from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.6.4/lib/chef/application/knife.rb:156:in `run'
from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.6.4/bin/knife:25:in `<top (required)>'
from /usr/bin/knife:255:in `load'
from /usr/bin/knife:255:in `<main>'

I'm trying to run spec/acceptance/ It gives LoadError cannot load acceptance_helper file

Error:
/home/geeta/DemoApp/demo_app/spec/acceptance/students_spec.rb:1:in `require': cannot load such file -- acceptance_helper (LoadError)
from /home/geeta/DemoApp/demo_app/spec/acceptance/students_spec.rb:1:in `<top (required)>'
from /home/geeta/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1327:in `load'
from /home/geeta/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1327:in `block in load_spec_files'
from /home/geeta/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1325:in `each'
from /home/geeta/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1325:in `load_spec_files'
from /home/geeta/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:102:in `setup'
from /home/geeta/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:88:in `run'
from /home/geeta/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:73:in `run'
from /home/geeta/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:41:in `invoke'
from /home/geeta/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.3.2/exe/rspec:4:in `<top (required)>'
from /home/geeta/.rvm/gems/ruby-2.2.1/bin/rspec:23:in `load'
from /home/geeta/.rvm/gems/ruby-2.2.1/bin/rspec:23:in `<main>'
from /home/geeta/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `eval'
from /home/geeta/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `<main>'
Try running command with
bundle exec rspec spec/...

Rails giving undefined method `workers' for main:Object (NoMethodError)

I am trying to setup puma on heroku for a rails app. I'm following Heroku's guide on how to do it, but the config file they give doesn't seem to work, and I can't figure out why. When I don't use any config file, it runs fine, but I want to be able to specify the number of workers and threads it uses.
When I try to run the server, I get the following error:
C:/Users/Ephraim/Documents/lis/rails_app/config/initializers/puma.rb:1:in `<top (required)>': undefined method `workers' for main:Object (NoMethodError)
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `block in load'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:652:in `block in load_config_initializer'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:166:in `instrument'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:651:in `load_config_initializer'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:615:in `each'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:615:in `block in <class:Engine>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:44:in `each'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:44:in `tsort_each_child'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:411:in `call'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:411:in `each_strongly_connected_component_from'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:345:in `each'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:345:in `call'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!'
from C:/Users/Ephraim/Documents/lis/rails_app/config/environment.rb:5:in `<top (required)>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from C:/Users/Ephraim/Documents/lis/rails_app/config.ru:3:in `block in <main>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from C:/Users/Ephraim/Documents/lis/rails_app/config.ru:in `new'
from C:/Users/Ephraim/Documents/lis/rails_app/config.ru:in `<main>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/server.rb:61:in `app'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/server.rb:139:in `log_to_stdout'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/server.rb:78:in `start'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
from C:/Users/Ephraim/Documents/lis/rails_app/bin/rails:8:in `require'
from C:/Users/Ephraim/Documents/lis/rails_app/bin/rails:8:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
Here is the puma.rb initializer I'm using:
workers Integer(ENV['WEB_CONCURRENCY'] || 2)
threads_count = Integer(ENV['MAX_THREADS'] || 5)
threads threads_count, threads_count
preload_app!
rackup DefaultRackup
port ENV['PORT'] || 3000
environment ENV['RACK_ENV'] || 'development'
on_worker_boot do
# Worker specific setup for Rails 4.1+
# See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
ActiveRecord::Base.establish_connection
end
What would cause this to happen? And how can I fix it?
Referencing an answer from here: puma initializer does not work with rails 4.2
Put the puma.rb file in config/ not config/initializers/
you need to use foreman https://github.com/ddollar/foreman to run the Procfile. That is how heroku will spool up the app. once installed foreman start should do the trick. this just fooled me for a bit and I ran across your question.

uninitialized constant ApplicationController (NameError) when run $ rspec spec

I am trying to use rspec for tdd in rails 4.1 . I am using spree commerce and refinery cms gem in rails. but when i run $ rspec spec it give me following error.
uninitialized constant ApplicationController (NameError)
from /home/zapbuild/.rvm/gems/ruby-2.1.2/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
from /home/zapbuild/.rvm/gems/ruby-2.1.2/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
from /home/zapbuild/.rvm/gems/ruby-2.1.2/bundler/gems/spree-refinery-authentication-f9168bd7fe97/lib/spree_refinery_authentication/engine.rb:1:in `<top (required)>'
from /home/zapbuild/.rvm/gems/ruby-2.1.2/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
from /home/zapbuild/.rvm/gems/ruby-2.1.2/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
from /home/zapbuild/.rvm/gems/ruby-2.1.2/bundler/gems/spree-refinery-authentication-f9168bd7fe97/lib/spree-refinerycms-authentication.rb:1:in `<top (required)>'
from /home/zapbuild/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `require'
from /home/zapbuild/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/zapbuild/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `each'
from /home/zapbuild/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `block in require'
from /home/zapbuild/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `each'
from /home/zapbuild/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `require'
from /home/zapbuild/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.6.2/lib/bundler.rb:132:in `require'
from /var/www/ws_groupbuy/config/application.rb:7:in `<top (required)>'
from /var/www/ws_groupbuy/config/environment.rb:2:in `require'
from /var/www/ws_groupbuy/config/environment.rb:2:in `<top (required)>'
from /var/www/ws_groupbuy/spec/spec_helper.rb:3:in `require'
from /var/www/ws_groupbuy/spec/spec_helper.rb:3:in `<top (required)>'
from /var/www/ws_groupbuy/spec/models/spree/product_spec.rb:1:in `require'
from /var/www/ws_groupbuy/spec/models/spree/product_spec.rb:1:in `<top (required)>'
from /home/zapbuild/.rvm/gems/ruby-2.1.2/gems/rspec-core-2.99.1/lib/rspec/core/configuration.rb:1065:in `load'
from /home/zapbuild/.rvm/gems/ruby-2.1.2/gems/rspec-core-2.99.1/lib/rspec/core/configuration.rb:1065:in `block in load_spec_files'
from /home/zapbuild/.rvm/gems/ruby-2.1.2/gems/rspec-core-2.99.1/lib/rspec/core/configuration.rb:1065:in `each'
from /home/zapbuild/.rvm/gems/ruby-2.1.2/gems/rspec-core-2.99.1/lib/rspec/core/configuration.rb:1065:in `load_spec_files'
from /home/zapbuild/.rvm/gems/ruby-2.1.2/gems/rspec-core-2.99.1/lib/rspec/core/command_line.rb:18:in `run'
from /home/zapbuild/.rvm/gems/ruby-2.1.2/gems/rspec-core-2.99.1/lib/rspec/core/runner.rb:103:in `run'
from /home/zapbuild/.rvm/gems/ruby-2.1.2/gems/rspec-core-2.99.1/lib/rspec/core/runner.rb:17:in `block in autorun'
My spec_helper is :
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require "capybara/rspec"
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
ActiveRecord::Migration.maintain_test_schema!
RSpec.configure do |config|
config.fixture_path = "#{::Rails.root}/spec/fixtures"
config.use_transactional_fixtures = true
config.infer_base_class_for_anonymous_controllers = false
config.order = "random"
config.infer_spec_type_from_file_location!