bundle exec rake secret cannot load such file -- phusion_passenger/rack_handler - ruby-on-rails

When I run this command to generate secret on production server. I followed the installation documentation from the official website of Passenger, since I'm using Passenger with NGINX.
The URL to the documentation can be found here: https://www.phusionpassenger.com/library/walkthroughs/deploy/ruby/aws/nginx/oss/rubygems_rvm/deploy_app.html:
bundle exec rake secret
[ec2-user#ip-172-31-20-167 feutradmin]$ bundle exec rake secret
rake aborted!
LoadError: cannot load such file -- phusion_passenger/rack_handler
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler/runtime.rb:86:in `require'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler/runtime.rb:86:in `block (2 levels) in require'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler/runtime.rb:81:in `each'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler/runtime.rb:81:in `block in require'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler/runtime.rb:70:in `each'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler/runtime.rb:70:in `require'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler.rb:102:in `require'
/var/www/html/feutradmin/config/application.rb:7:in `<top (required)>'
/var/www/html/feutradmin/Rakefile:4:in `require'
/var/www/html/feutradmin/Rakefile:4:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler/cli/exec.rb:63:in `load'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler/cli/exec.rb:24:in `run'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler/cli.rb:304:in `exec'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler/cli.rb:11:in `start'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/exe/bundle:27:in `block in <top (required)>'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler/friendly_errors.rb:98:in `with_friendly_errors'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/exe/bundle:19:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.3.0/bin/bundle:23:in `load'
/usr/local/rvm/gems/ruby-2.3.0/bin/bundle:23:in `<main>'
/usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)

I added
gem "passenger", ">=5.0.25", require: "phusion_passenger/rack_handler"
followed by bundle install to get rid of the error.

Related

Debug_inspector extension was not loaded rake aborted

I try install Canvas LMS on ubuntu 20.4 And I get the error
when executing this command
commands:
sysadmin#appserver:var/canvas$ sudo yarn install
sysadmin#appserver:/var/canvas$ sudo RAILS_ENV=production bundle exec rake canvas:compile_assets
Result:
debug_inspector extension was not loaded
rake aborted!
LoadError: incompatible library version - /var/canvas/vendor/bundle/ruby/2.7.0/gems/io-console-0.5.11/lib/io/console.so
/var/canvas/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.7/lib/active_support/dependencies.rb:324:in `require'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.7/lib/active_support/dependencies.rb:324:in `block in require'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.7/lib/active_support/dependencies.rb:291:in `load_dependency'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.7/lib/active_support/dependencies.rb:324:in `require'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/reline-0.3.1/lib/reline.rb:1:in `<top (required)>'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.7/lib/active_support/dependencies.rb:324:in `require'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.7/lib/active_support/dependencies.rb:324:in `block in require'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.7/lib/active_support/dependencies.rb:291:in `load_dependency'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.7/lib/active_support/dependencies.rb:324:in `require'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/irb-1.4.1/lib/irb.rb:13:in `<top (required)>'
/var/lib/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/runtime.rb:66:in `require'
/var/lib/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/runtime.rb:66:in `block (2 levels) in require'
/var/lib/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/runtime.rb:61:in `each'
/var/lib/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/runtime.rb:61:in `block in require'
/var/lib/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/runtime.rb:50:in `each'
/var/lib/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/runtime.rb:50:in `require'
/var/lib/gems/2.7.0/gems/bundler-2.2.19/lib/bundler.rb:174:in `require'
/var/canvas/config/application.rb:28:in `<top (required)>'
/var/canvas/Rakefile:6:in `require'
/var/canvas/Rakefile:6:in `<top (required)>'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/exe/rake:27:in `<top (required)>'
/var/lib/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/cli/exec.rb:63:in `load'
/var/lib/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/cli/exec.rb:63:in `kernel_load'
/var/lib/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/cli/exec.rb:28:in `run'
/var/lib/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/cli.rb:474:in `exec'
/var/lib/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/var/lib/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/var/lib/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/var/lib/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/cli.rb:30:in `dispatch'
/var/lib/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/var/lib/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/cli.rb:24:in `start'
/var/lib/gems/2.7.0/gems/bundler-2.2.19/exe/bundle:49:in `block in <top (required)>'
/var/lib/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
/var/lib/gems/2.7.0/gems/bundler-2.2.19/exe/bundle:37:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
(See full trace by running task with --trace)
ruby version : 2.7.5
gem: 3.1.6

Redmine installation on MacOS Mojave 10.14.6

I've been following this installation guide for Redmine http://www.redmine.org/projects/redmine/wiki/RedmineInstall. Everything went smoothly until step 5 in which I have to run
bundle exec rake generate_secret_token
Then I got this error
rake aborted!
LoadError: dlopen(/Library/Ruby/Gems/2.3.0/gems/mysql2-0.4.10/lib/mysql2/mysql2.bundle, 0x0009): dependent dylib 'libssl.1.0.0.dylib' not found for '/Library/Ruby/Gems/2.3.0/gems/mysql2-0.4.10/lib/mysql2/mysql2.bundle' - /Library/Ruby/Gems/2.3.0/gems/mysql2-0.4.10/lib/mysql2/mysql2.bundle
/Library/Ruby/Gems/2.3.0/gems/mysql2-0.4.10/lib/mysql2.rb:31:in `require'
/Library/Ruby/Gems/2.3.0/gems/mysql2-0.4.10/lib/mysql2.rb:31:in `<top (required)>'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:81:in `require'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:76:in `each'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:76:in `block in require'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:65:in `each'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:65:in `require'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler.rb:114:in `require'
/Users/dongphan/Desktop/redmine-3.4.11/config/application.rb:5:in `<top (required)>'
/Users/dongphan/Desktop/redmine-3.4.11/Rakefile:5:in `require'
/Users/dongphan/Desktop/redmine-3.4.11/Rakefile:5:in `<top (required)>'
/Library/Ruby/Gems/2.3.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/cli/exec.rb:74:in `load'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/cli/exec.rb:74:in `kernel_load'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/cli/exec.rb:28:in `run'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/cli.rb:463:in `exec'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/cli.rb:27:in `dispatch'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/cli.rb:18:in `start'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/exe/bundle:30:in `block in <top (required)>'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/exe/bundle:22:in `<top (required)>'
/usr/local/bin/bundle:22:in `load'
/usr/local/bin/bundle:22:in `<main>'
(See full trace by running task with --trace)
Seems like libssl.1.0.0.dylib is not found, what should I do to resolve this?

rake db:schema:dump not working

I'm learning ruby on rails on windows platform in windows 8. Now I'm in the database part where rake db:schema:dump command should create a file in config folder named schema.rb, but that's not happening. When I'm typing rake db:schema:dump it shows rake aborted and a long list. Please help.
Here is what shows up in console:
C:\Users\New User\sites2\learning_rails>rake db:schema;dump
rake aborted!
Bundler::GemRequireError: There was an error while trying to load the gem 'uglif
ier'.
Gem Load Error is: Could not find a JavaScript runtime. See https://github.com/r
ails/execjs for a list of available runtimes.
Backtrace for gem load error is:
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in
`autodetect'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `<module:
ExecJS>'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `<top (re
quired)>'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/uglifier-3.0.0/lib/uglifier.rb:5:in `requ
ire'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/uglifier-3.0.0/lib/uglifier.rb:5:in `<top
(required)>'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:
in `require'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:
in `block (2 levels) in require'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:
in `each'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:
in `block in require'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:
in `each'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:
in `require'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler.rb:102:in `req
uire'
C:/Users/New User/sites2/learning_rails/config/application.rb:7:in `<top (requir
ed)>'
C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in
`require'
C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in
`require'
C:/Users/New User/sites2/learning_rails/Rakefile:4:in `<top (required)>'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/rake_module.rb:28:in
`load'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/rake_module.rb:28:in
`load_rakefile'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/application.rb:689:i
n `raw_load_rakefile'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/application.rb:94:in
`block in load_rakefile'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/application.rb:176:i
n `standard_exception_handling'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/application.rb:93:in
`load_rakefile'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/application.rb:77:in
`block in run'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/application.rb:176:i
n `standard_exception_handling'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/application.rb:75:in
`run'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rake-11.1.2/bin/rake:33:in `<top (require
d)>'
C:/Ruby22-x64/bin/rake:22:in `load'
C:/Ruby22-x64/bin/rake:22:in `<main>'
Bundler Error Backtrace:
C:/Users/New User/sites2/learning_rails/config/application.rb:7:in `<top (requir
ed)>'
C:/Users/New User/sites2/learning_rails/Rakefile:4:in `<top (required)>'
ExecJS::RuntimeUnavailable: Could not find a JavaScript runtime. See https://git
hub.com/rails/execjs for a list of available runtimes.
C:/Users/New User/sites2/learning_rails/config/application.rb:7:in `<top (requir
ed)>'
C:/Users/New User/sites2/learning_rails/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)
install nodejs
Uglifier is JavaScript compressor, so it need javascript runtime try installing nodejs
apt-get install nodejs
or
brew install nodejs
if you are on a OSX.

rake command gets "cannot load such file -- yaml/encoding"

I want to use ruby-1.9.3-p194 on CentOS 5.8. I could install it with rvm and also system (libyaml and libyaml-devel were installed). But I can't run all of 'rake' tasks (not only 'rake spec').
I got "cannot load such file -- yaml/encoding". It's a sample result with trace. The 'rake' version is '0.9.2.2'. How can I resolve it?
$ rake spec --trace
rake aborted!
cannot load such file -- yaml/encoding
/home/inohiro/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:182:in `require'
/home/inohiro/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:182:in `block in require'
/home/inohiro/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:547:in `new_constants_in'
/home/inohiro/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:182:in `require'
/home/inohiro/Projects/rails_2_3_14_r5066/src/admin/lib/tasks/fixture_dump.rake:2:in `<top (required)>'
/home/inohiro/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:171:in `load'
/home/inohiro/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:171:in `block in load_with_new_constant_marking'
/home/inohiro/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:547:in `new_constants_in'
/home/inohiro/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:171:in `load_with_new_constant_marking'
/home/inohiro/.rvm/gems/ruby-1.9.3-p194/gems/rails-2.3.14/lib/tasks/rails.rb:14:in `block in <top (required)>'
/home/inohiro/.rvm/gems/ruby-1.9.3-p194/gems/rails-2.3.14/lib/tasks/rails.rb:14:in `each'
/home/inohiro/.rvm/gems/ruby-1.9.3-p194/gems/rails-2.3.14/lib/tasks/rails.rb:14:in `<top (required)>'
/home/inohiro/Projects/rails_2_3_14_r5066/src/admin/Rakefile:10:in `require'
/home/inohiro/Projects/rails_2_3_14_r5066/src/admin/Rakefile:10:in `<top (required)>'
/home/inohiro/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load'
/home/inohiro/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/home/inohiro/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/application.rb:501:in `raw_load_rakefile'
/home/inohiro/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/application.rb:82:in `block in load_rakefile'
/home/inohiro/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/inohiro/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/application.rb:81:in `load_rakefile'
/home/inohiro/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/application.rb:65:in `block in run'
/home/inohiro/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/inohiro/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/home/inohiro/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/home/inohiro/.rvm/gems/ruby-1.9.3-p194/bin/rake:19:in `load'
/home/inohiro/.rvm/gems/ruby-1.9.3-p194/bin/rake:19:in `<main>'
It's not a rake problem, it's a ruby <=> rails version incompatibility. You're using the most recent stable version of ruby with the rails version from the era of dinosaurs.
You need to do some hacking in order for them to understand each other!
Here's a nice read that should get you started:
http://scottiestech.info/2012/02/07/make-rails-2-3-x-happy-with-ruby-1-9-3/
This gist also rocks:
https://gist.github.com/1976864 (thanks Jonathan!)

Running rspec Gem

When I run $ rspec spec/ I receive this error:
You must use ANSICON 1.31 or later (http://adoxa.110mb.com/ansicon/) to use colour on Windows
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:31:in `block in setup': You have already activated rspec-core 2.7.1,but your Gemfile requires rspec-core 2.0.1. Consider using bundle exec. (Gem::LoadError) from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/runtime.rb:17:in `setup'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler.rb:107:in `setup'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/setup.rb:7:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:59:in `require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:59:in `rescue in require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:35:in `require'
from c:/Sites/app2/config/boot.rb:6:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require'
from c:/Sites/app2/config/application.rb:1:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require'
from c:/Sites/app2/config/environment.rb:2:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require'
from c:/Sites/app2/spec/spec_helper.rb:3:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require'
from c:/Sites/app2/spec/controllers/pages_controller_spec.rb:1:in `<top
(required)>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.7
.1/lib/rspec/core/configuration.rb:459:in `load'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.7
.1/lib/rspec/core/configuration.rb:459:in `block in load_spec_files'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.7
.1/lib/rspec/core/configuration.rb:459:in `map'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.7
.1/lib/rspec/core/configuration.rb:459:in `load_spec_files'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.7
.1/lib/rspec/core/command_line.rb:18:in `run'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.7
.1/lib/rspec/core/runner.rb:80:in `run_in_process'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.7
.1/lib/rspec/core/runner.rb:69:in `run' from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.7.1/lib/rspec/core/runner.rb:10:in `block in autorun'k in autorun'
I have rspec and rspec-core installed:
bundle show rspec
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-2.0.1
bundle show rspec-core
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1
What do I need to do to run rspec?
Well, the solution is right in the error message:
Consider using bundle exec.
So you type:
$ bundle exec rspec spec/
But that's twice as many characters to type! Can't have that! So consider bundle install --binstubs:
Do this once:
$ bundle install --binstubs
Now this "just works"
$ rspec spec/

Resources