unable to run rake tasks from docker - ruby-on-rails

I have this
RUN RAILS_ENV=production bundle exec rails hello:world --trace
in my Dockerfile
and I have the following in the lib/tasks/hello.rake
namespace :hello do
task world: :environment do
puts "hello world"
end
end
I am getting the following error
Step 19/38 : RUN RAILS_ENV=production bundle exec rails hello:world --trace
---> Running in e98bd85e9e81
rails aborted!
LoadError: cannot load such file -- etc
/app/vendor/bundle/ruby/2.5.0/gems/puma-3.11.4/lib/puma.rb:5:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/puma-3.11.4/lib/puma.rb:5:in `<top (required)>'
/usr/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:81:in `require'
/usr/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
/usr/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:76:in `each'
/usr/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:76:in `block in require'
/usr/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:65:in `each'
/usr/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:65:in `require'
/usr/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler.rb:114:in `require'
/app/config/application.rb:19:in `<top (required)>'
/app/Rakefile:4:in `require_relative'
/app/Rakefile:4:in `<top (required)>'
/app/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load'
/app/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load_rakefile'
/app/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:703:in `raw_load_rakefile'
/app/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:104:in `block in load_rakefile'
/app/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/app/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:103:in `load_rakefile'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.1.6/lib/rails/commands/rake/rake_command.rb:20:in `block in perform'
/app/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.1.6/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.1.6/lib/rails/command.rb:46:in `invoke'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.1.6/lib/rails/commands.rb:16:in `<top (required)>'
bin/rails:9:in `require'
bin/rails:9:in `<main>'
The command '/bin/sh -c RAILS_ENV=production bundle exec rails hello:world --trace' returned a non-zero code: 1

Related

CircleCI builds fail on rake db:create

I have a project that I cannot get to build on CircleCI. All tests pass locally. If the build fails, and I rerun the build with ssh, I can connect and run all of the commands successfully, and all tests pass in the ssh session.
The build is failing at bundle exec rake db:create
I've tried rearranging my require statements in config/application.rb to no avail. Any ideas?
Here is the full backtrace:
bundle exec rake db:create --trace
rake aborted!
/usr/local/lib/ruby/2.4.0/uri.rb:99: warning: already initialized constant URI::VERSION_CODE
/usr/local/lib/ruby/2.4.0/uri.rb:99: warning: previous definition of VERSION_CODE was here
/usr/local/lib/ruby/2.4.0/uri.rb:100: warning: already initialized constant URI::VERSION
/usr/local/lib/ruby/2.4.0/uri.rb:100: warning: previous definition of VERSION was here
NameError: uninitialized constant URI::Generic
Did you mean? URI::Generic
/usr/local/lib/ruby/2.4.0/uri/ftp.rb:23:in `<module:URI>'
/usr/local/lib/ruby/2.4.0/uri/ftp.rb:13:in `<top (required)>'
/usr/local/lib/ruby/2.4.0/uri.rb:107:in `require'
/usr/local/lib/ruby/2.4.0/uri.rb:107:in `<top (required)>'
/usr/local/lib/ruby/2.4.0/uri/rfc2396_parser.rb:13:in `require'
/usr/local/lib/ruby/2.4.0/uri/rfc2396_parser.rb:13:in `<top (required)>'
/usr/local/lib/ruby/2.4.0/uri/common.rb:13:in `require'
/usr/local/lib/ruby/2.4.0/uri/common.rb:13:in `<top (required)>'
/usr/local/lib/ruby/2.4.0/uri/generic.rb:12:in `require'
/usr/local/lib/ruby/2.4.0/uri/generic.rb:12:in `<top (required)>'
/usr/local/bundle/ruby/2.4.0/gems/activesupport-5.2.4.1/lib/active_support/core_ext/object/json.rb:6:in `require'
/usr/local/bundle/ruby/2.4.0/gems/activesupport-5.2.4.1/lib/active_support/core_ext/object/json.rb:6:in `<top (required)>'
/usr/local/bundle/ruby/2.4.0/gems/activesupport-5.2.4.1/lib/active_support/core_ext/object.rb:13:in `require'
/usr/local/bundle/ruby/2.4.0/gems/activesupport-5.2.4.1/lib/active_support/core_ext/object.rb:13:in `<top (required)>'
/usr/local/bundle/ruby/2.4.0/gems/railties-5.2.4.1/lib/rails/configuration.rb:4:in `require'
/usr/local/bundle/ruby/2.4.0/gems/railties-5.2.4.1/lib/rails/configuration.rb:4:in `<top (required)>'
/usr/local/bundle/ruby/2.4.0/gems/railties-5.2.4.1/lib/rails/railtie/configuration.rb:3:in `require'
/usr/local/bundle/ruby/2.4.0/gems/railties-5.2.4.1/lib/rails/railtie/configuration.rb:3:in `<top (required)>'
/usr/local/bundle/ruby/2.4.0/gems/railties-5.2.4.1/lib/rails/railtie.rb:223:in `require'
/usr/local/bundle/ruby/2.4.0/gems/railties-5.2.4.1/lib/rails/railtie.rb:223:in `config'
/usr/local/bundle/ruby/2.4.0/gems/railties-5.2.4.1/lib/rails/railtie.rb:127:in `config'
/usr/local/bundle/ruby/2.4.0/gems/activesupport-5.2.4.1/lib/active_support/i18n_railtie.rb:11:in `<class:Railtie>'
/usr/local/bundle/ruby/2.4.0/gems/activesupport-5.2.4.1/lib/active_support/i18n_railtie.rb:10:in `<module:I18n>'
/usr/local/bundle/ruby/2.4.0/gems/activesupport-5.2.4.1/lib/active_support/i18n_railtie.rb:9:in `<top (required)>'
/usr/local/bundle/ruby/2.4.0/gems/activesupport-5.2.4.1/lib/active_support/railtie.rb:4:in `require'
/usr/local/bundle/ruby/2.4.0/gems/activesupport-5.2.4.1/lib/active_support/railtie.rb:4:in `<top (required)>'
/usr/local/bundle/ruby/2.4.0/gems/railties-5.2.4.1/lib/rails.rb:17:in `require'
/usr/local/bundle/ruby/2.4.0/gems/railties-5.2.4.1/lib/rails.rb:17:in `<top (required)>'
/usr/local/bundle/ruby/2.4.0/gems/railties-5.2.4.1/lib/rails/all.rb:3:in `require'
/usr/local/bundle/ruby/2.4.0/gems/railties-5.2.4.1/lib/rails/all.rb:3:in `<top (required)>'
/home/circleci/vce/config/application.rb:7:in `require'
/home/circleci/vce/config/application.rb:7:in `<top (required)>'
/home/circleci/vce/Rakefile:4:in `require'
/home/circleci/vce/Rakefile:4:in `<top (required)>'
/usr/local/bundle/ruby/2.4.0/gems/rake-10.5.0/lib/rake/rake_module.rb:28:in `load'
/usr/local/bundle/ruby/2.4.0/gems/rake-10.5.0/lib/rake/rake_module.rb:28:in `load_rakefile'
/usr/local/bundle/ruby/2.4.0/gems/rake-10.5.0/lib/rake/application.rb:689:in `raw_load_rakefile'
/usr/local/bundle/ruby/2.4.0/gems/rake-10.5.0/lib/rake/application.rb:94:in `block in load_rakefile'
/usr/local/bundle/ruby/2.4.0/gems/rake-10.5.0/lib/rake/application.rb:176:in `standard_exception_handling'
/usr/local/bundle/ruby/2.4.0/gems/rake-10.5.0/lib/rake/application.rb:93:in `load_rakefile'
/usr/local/bundle/ruby/2.4.0/gems/rake-10.5.0/lib/rake/application.rb:77:in `block in run'
/usr/local/bundle/ruby/2.4.0/gems/rake-10.5.0/lib/rake/application.rb:176:in `standard_exception_handling'
/usr/local/bundle/ruby/2.4.0/gems/rake-10.5.0/lib/rake/application.rb:75:in `run'
/usr/local/bundle/ruby/2.4.0/gems/rake-10.5.0/bin/rake:33:in `<top (required)>'
/usr/local/bundle/ruby/2.4.0/bin/rake:23:in `load'
/usr/local/bundle/ruby/2.4.0/bin/rake:23:in `<top (required)>'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `load'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:in `run'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in `exec'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start'
/usr/local/bundle/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in `with_friendly_errors'
/usr/local/bundle/gems/bundler-2.1.4/exe/bundle:34:in `<top (required)>'
/usr/local/bundle/bin/bundle:113:in `load'
/usr/local/bundle/bin/bundle:113:in `<main>'
Exited with code exit status 1
CircleCI received exit code 1```
This may not be a full answer, but I had a similar issue when using the circleci/ruby:2.4.2-jessie-node image. I didn't dig in very much, but on the surface there seems to be an issue with loading the URI::Generic class.
Since this error came from core ruby itself I chalked it up to that image, and updated the image to circleci/ruby:2.4.3-jessie-node and didn't run into the same error.
Which I had more info, but haven't had a chance for a deeper dive:
TL;DR
In the file .circleci/config.yml update:
docker:
- image: circleci/ruby:2.4.2-jessie-node
to
docker:
- image: circleci/ruby:2.4.3-jessie-node

rake aborted: LoadError: cannot load such file -- /home/deploy/myapp/config/application

I am getting following error while running command
bundle exec rake db:migrate --trace
I am using rvm and ruby version is 2.3.1.
Here is output
deploy#localhost:~/my-sources$ bundle exec rake db:migrate
--trace rake aborted! LoadError: cannot load such file -- /home/deploy/myapp/config/application
/home/deploy/myapp-sources/Rakefile:4:in `require'
/home/deploy/myapp-sources/Rakefile:4:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.3.1#global/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load'
/usr/local/rvm/gems/ruby-2.3.1#global/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load_rakefile'
/usr/local/rvm/gems/ruby-2.3.1#global/gems/rake-10.4.2/lib/rake/application.rb:689:in `raw_load_rakefile'
/usr/local/rvm/gems/ruby-2.3.1#global/gems/rake-10.4.2/lib/rake/application.rb:94:in `block in load_rakefile'
/usr/local/rvm/gems/ruby-2.3.1#global/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-2.3.1#global/gems/rake-10.4.2/lib/rake/application.rb:93:in `load_rakefile'
/usr/local/rvm/gems/ruby-2.3.1#global/gems/rake-10.4.2/lib/rake/application.rb:77:in `block in run'
/usr/local/rvm/gems/ruby-2.3.1#global/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-2.3.1#global/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/usr/local/rvm/gems/ruby-2.3.1#global/gems/rake-10.4.2/bin/rake:33:in `<top (required)>' /usr/local/rvm/rubies/ruby-2.3.1/bin/rake:23:in
`load' /usr/local/rvm/rubies/ruby-2.3.1/bin/rake:23:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.17.1/lib/bundler/cli/exec.rb:74:in `load'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.17.1/lib/bundler/cli/exec.rb:74:in `kernel_load'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.17.1/lib/bundler/cli/exec.rb:28:in `run'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.17.1/lib/bundler/cli.rb:463:in `exec'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.17.1/lib/bundler/cli.rb:27:in `dispatch'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.17.1/lib/bundler/cli.rb:18:in `start'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.17.1/exe/bundle:30:in `block in <top (required)>'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.17.1/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.17.1/exe/bundle:22:in `<top (required)>' /usr/local/rvm/gems/ruby-2.3.1/bin/bundle:23:in `load' /usr/local/rvm/gems/ruby-2.3.1/bin/bundle:23:in `<main>'
/usr/local/rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in
`<main>'

Rake Command Not Working

Getting this error while running RAKE command :-
rake --trace
rake aborted!
There was an error while trying to load the gem 'coffee-rails'.
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.11.2/lib/bundler/runtime.rb:81:in rescue in block (2 levels) in require'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
/apps/apache/Sekhmet/user/config/application.rb:7:in `<top (required)>'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
/apps/apache/Sekhmet/user/Rakefile:5:in `<top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rake-10.1.0/lib/rake/rake_module.rb:25:in `load'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rake-10.1.0/lib/rake/rake_module.rb:25:in `load_rakefile'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rake-10.1.0/lib/rake/application.rb:637:in `raw_load_rakefile'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rake-10.1.0/lib/rake/application.rb:94:in `block in load_rakefile'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rake-10.1.0/lib/rake/application.rb:93:in `load_rakefile'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rake-10.1.0/lib/rake/application.rb:77:in `block in run'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rake-10.1.0/lib/rake/application.rb:75:in `run'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rake-10.1.0/bin/rake:33:in `<top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p194/bin/rake:22:in `load'
/usr/local/rvm/gems/ruby-1.9.3-p194/bin/rake:22:in `<main>'
Following is my Rake File:-
require File.expand_path('../config/application', FILE)
MyAppName::Application.load_tasks
Please Help!
Do this
gem install coffee-rails
Then restart server and run rake command

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

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.

LoadError: cannot load such file -- spec/rake/spectask Fedena

:~/Documents/fedena/fedena-v2.3-bundle-linux$ rake db:create
rake aborted!
LoadError: cannot load such file -- spec/rake/spectask
/var/lib/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `block in require'
/var/lib/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
/var/lib/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
/home/cool_admin/Documents/fedena/fedena-v2.3-bundle-linux/lib/tasks/rspec.rake:22:in `<top (required)>'
/var/lib/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in `load'
/var/lib/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in `block in load_with_new_constant_marking'
/var/lib/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
/var/lib/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in `load_with_new_constant_marking'
/var/lib/gems/1.9.1/gems/rails-2.3.5/lib/tasks/rails.rb:9:in `block in <top (required)>'
/var/lib/gems/1.9.1/gems/rails-2.3.5/lib/tasks/rails.rb:9:in `each'
/var/lib/gems/1.9.1/gems/rails-2.3.5/lib/tasks/rails.rb:9:in `<top (required)>'
/home/cool_admin/Documents/fedena/fedena-v2.3-bundle-linux/Rakefile:12:in `<top (required)>'
(See full trace by running task with --trace)
---------------------------------------------------------
~/Documents/fedena/fedena-v2.3-bundle-linux$ rake db:create --trace
rake aborted!
LoadError: cannot load such file -- spec/rake/spectask
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/var/lib/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `block in require'
/var/lib/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
/var/lib/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
/home/cool_admin/Documents/fedena/fedena-v2.3-bundle-linux/lib/tasks/rspec.rake:22:in `<top (required)>'
/var/lib/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in `load'
/var/lib/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in `block in load_with_new_constant_marking'
/var/lib/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
/var/lib/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in `load_with_new_constant_marking'
/var/lib/gems/1.9.1/gems/rails-2.3.5/lib/tasks/rails.rb:9:in `block in <top (required)>'
/var/lib/gems/1.9.1/gems/rails-2.3.5/lib/tasks/rails.rb:9:in `each'
/var/lib/gems/1.9.1/gems/rails-2.3.5/lib/tasks/rails.rb:9:in `<top (required)>'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/home/cool_admin/Documents/fedena/fedena-v2.3-bundle-linux/Rakefile:12:in `<top (required)>'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/rake_module.rb:28:in `load'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/rake_module.rb:28:in `load_rakefile'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:687:in `raw_load_rakefile'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:94:in `block in load_rakefile'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:93:in `load_rakefile'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:77:in `block in run'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:75:in `run'
/var/lib/gems/1.9.1/gems/rake-10.3.2/bin/rake:33:in `<top (required)>'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `<main>'
It looks like you've upgraded from RSpec 1 to RSpec 2. You need to update your Rakefile to use the new require format:
rspec-1
require 'spec/rake/spectask'
Spec::Rake::SpecTask.new do |t|
t.spec_opts = ['--options', "\"spec/spec.opts\""]
t.spec_files = FileList['spec/**/*.rb']
end
rspec-2
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new do |t|
t.rspec_opts = ["-c", "-f progress", "-r ./spec/spec_helper.rb"]
t.pattern = 'spec/**/*_spec.rb'
end
Additional info about upgrading RSpec can be found here:
https://www.relishapp.com/rspec/rspec-core/docs/upgrade

Resources