I develop a package called CodeRunner that has a number of add-on package (CodeRunner modules, all with names like ...crmod). One of these is called trinitycrmod.
On Debian stable (wheezy), I have installed RVM using the standard instructions. My .bashrc is setup correctly: the final line is:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
I am using Ruby 2.1.0 (but this error can be reproduced with 1.9.3)
rvm use 2.1
I have installed CodeRunner and trinitycrmod:
gem install coderunner
gem install trinitycrmod
Now the CodeRunner gem contains the tool coderunner. One of coderunner's commands is called ex
, and it evaluates the ruby fragment you give the command. I want to load trinitycrmod.
coderunner ex ' require "trinitycrmod"'
But I get an error when loading the file (which is part of the installed gem).
.rvm/gems/ruby-2.1.0/gems/coderunner-0.13.32/lib/coderunner.rb:118:in `require': cannot load such file -- trinitycrmod (LoadError)
I don't get this error if I use ruby directly....
ruby `which coderunner` ex ' require "trinitycrmod"'
runs fine. I also don't get this error if I use the system ruby:
rvm use system
coderunner ex ' require "trinitycrmod"'
I also don't get this error if I edit the coderunner bin file and replace ruby_executable_hooks with plain ruby:
sed -i s/ruby_executable_hooks/ruby/ `which coderunner`
This makes me think that it has to be an error with ruby gems and/or rvm and not my mistake, particularly as this code is all at least 6 months old and has worked fine up till now.
PS My gem environment seems to be just fine....
- RUBYGEMS VERSION: 2.2.1
- RUBY VERSION: 2.1.0 (2013-12-25 patchlevel 0) [x86_64-linux]
- INSTALLATION DIRECTORY: /home/edmundhighcock/.rvm/gems/ruby-2.1.0
- RUBY EXECUTABLE: /home/edmundhighcock/.rvm/rubies/ruby-2.1.0/bin/ruby
- EXECUTABLE DIRECTORY: /home/edmundhighcock/.rvm/gems/ruby-2.1.0/bin
- SPEC CACHE DIRECTORY: /home/edmundhighcock/.gem/specs
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /home/edmundhighcock/.rvm/gems/ruby-2.1.0
- /home/edmundhighcock/.rvm/gems/ruby-2.1.0@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- SHELL PATH:
- /home/edmundhighcock/.rvm/gems/ruby-2.1.0/bin
- /home/edmundhighcock/.rvm/gems/ruby-2.1.0@global/bin
- /home/edmundhighcock/.rvm/rubies/ruby-2.1.0/bin
- /home/edmundhighcock/.rvm/bin
- /home/edmundhighcock/Code/scripts
- /usr/local/bin
- /usr/bin
- /bin
- /usr/local/games
- /usr/games
irb
thenrequire "trinitycrmod"
? – Малъ Скрылевъgsl
, gemscoderunner
andtrinitycrmod
and then tried running the commandcoderunner ex ' require "trinitycrmod"'
, and is ran without any error, could you do gem list and check whethertrinitycrmod
is installed or not? – Sachin Singhirb
thenrequire "trinitycrmod"
works fine. – arcticvoice