D
Demonic Software
[Note: parts of this message were removed to make it a legal post.]
Hello,
I am in the process of trying to setup a ruby development environment (not
for Ruby on Rails), and I was wondering how I go about using ruby gems in a
script or from irb. I have tried setting the environment variables in the
two following ways:
$ printenv | grep GEM
GEM_HOME=/usr/lib/ruby/gems/1.8/gems/
GEM_PATH=/usr/lib/ruby/gems/1.8/gems/
$ ls $GEM_PATH
hoe-1.5.0 hoe-1.5.1 ParseTree-2.1.1 rake-0.8.1 ruby2ruby-1.1.8
rubyforge-0.4.4 rubyforge-0.4.5 rubygems-update-1.0.1 RubyInline-3.6.6
$ irb
irb(main):001:0> require "ruby2ruby"
LoadError: no such file to load -- ruby2ruby
from (irb):1:in `require'
from (irb):1
irb(main):002:0>
== and ==
$ printenv | grep GEM
GEM_HOME=/usr/lib/ruby/gems/1.8/
GEM_PATH=/usr/lib/ruby/gems/1.8/
$ ls $GEM_PATH
cache doc gems source_cache specifications
$ irb
irb(main):001:0> require 'ruby2ruby'
LoadError: no such file to load -- ruby2ruby
from (irb):1:in `require'
from (irb):1
irb(main):002:0>
Every time I google a majority of the links point to some documentation on
how to set-up and configure Ruby on Rails. I am just trying to set-up an
environment, where I can write a script and use gems directly in the script
or from the irb prompt. For example:
#foobar.rb
require 'foo' # where foo is a module in my gems directory
foo.new('bar')
$ruby foobar.rb
Thanks in advance for your help.
Hello,
I am in the process of trying to setup a ruby development environment (not
for Ruby on Rails), and I was wondering how I go about using ruby gems in a
script or from irb. I have tried setting the environment variables in the
two following ways:
$ printenv | grep GEM
GEM_HOME=/usr/lib/ruby/gems/1.8/gems/
GEM_PATH=/usr/lib/ruby/gems/1.8/gems/
$ ls $GEM_PATH
hoe-1.5.0 hoe-1.5.1 ParseTree-2.1.1 rake-0.8.1 ruby2ruby-1.1.8
rubyforge-0.4.4 rubyforge-0.4.5 rubygems-update-1.0.1 RubyInline-3.6.6
$ irb
irb(main):001:0> require "ruby2ruby"
LoadError: no such file to load -- ruby2ruby
from (irb):1:in `require'
from (irb):1
irb(main):002:0>
== and ==
$ printenv | grep GEM
GEM_HOME=/usr/lib/ruby/gems/1.8/
GEM_PATH=/usr/lib/ruby/gems/1.8/
$ ls $GEM_PATH
cache doc gems source_cache specifications
$ irb
irb(main):001:0> require 'ruby2ruby'
LoadError: no such file to load -- ruby2ruby
from (irb):1:in `require'
from (irb):1
irb(main):002:0>
Every time I google a majority of the links point to some documentation on
how to set-up and configure Ruby on Rails. I am just trying to set-up an
environment, where I can write a script and use gems directly in the script
or from the irb prompt. For example:
#foobar.rb
require 'foo' # where foo is a module in my gems directory
foo.new('bar')
$ruby foobar.rb
Thanks in advance for your help.