I am trying to execute a Capistrano task that requires resetting a database but when I come upon a particular line of code I receive the error illustrated in the title. Here is the complete error message:
RAILS_ENV=testing script/runner 'Account.all.each(&:reindex_person)' exit status: 1
cd /var/local/openhub/current && RAILS_ENV=testing script/runner
'Account.all.each(&:reindex_person)' stdout: Nothing written
cd /var/local/openhub/current && RAILS_ENV=testing script/runner
'Account.all.each(&:reindex_person)' stderr:
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in
`require': cannot load such file -- script/../config/boot (LoadError)
As you can see in the message, the error is triggered by the script/runner
command. To better understand the issue that I am having, I have turned to these three stack overflow questions with roughly the same error:
- cannot load such file — script/../config/boot (LoadError) after OSX Mavericks
- no such file to load — rubygems (LoadError)
- Strange inability to require config/boot
I am using
- ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
- Rails 2.3.18
From the suggestions in the questions, it seems that the problem was that multiple versions of ruby were installed in the OS and that by removing them until one remained, the problem could be fixed. That's not the case with me. When I run which -a ruby
I get the output /usr/bin/ruby
and I have only ruby 1.9.3 installed.
However, I noticed this little oddity in my system. /usr/bin/ruby1.9.1
This must be the error that I am having. The inconsistency is what I believe is causing the error, but it is strange to me because I am able to run script/server
and script/console
just fine.
What would be the solution for this, to my knowledge the system that I use does not have rvm. Do I need to uninstall ruby and re-install version 1.9.3? I am trying to better understand what problem I'm having because as it stands I am still a novice programmer and I'm a little hesitant to breaking my entire testing system by messing with the internals without a complete understanding of what is taking place. Help would be much appreciated. Thanks.