Using rvm with a standalone ruby script

Posted by John Yeates on Stack Overflow See other posts from Stack Overflow or by John Yeates
Published on 2010-06-13T11:14:12Z Indexed on 2010/06/13 11:22 UTC
Read the original article Hit count: 378

Filed under:
|

I have rvm installed on a Mac OS X 10.6 system with the system ruby and 1.9.1. I also have this basic ruby script:

#!/usr/bin/ruby

require 'curb-fu'

I need the script to use the system ruby regardless of what rvm's using at any given time; I'm assuming that I've got that right, at least.

I've switched to the system ruby (rvm use system) and then installed the gem (gem install curb-fu). If I run irb and type require 'curb-fu', it works. However, running that script with ./myscript.rb fails:

/Users/me/bin/podcast_notify.rb:6:in `require': no such file to load -- curb-fu (LoadError)
from /Users/me/bin/podcast_notify.rb:6

What's going wrong here? How do I install curb-fu so that it's always available to this script?

© Stack Overflow or respective owner

Related posts about ruby

Related posts about rvm