REE and ruby PATH problem

I have ruby normal edition installed in /usr/bin
REE in /opt/ruby-enterprise-1.8.7-2010.01/bin
I have all my application gems installed in /opt/ruby-
enterprise-1.8.7-2010.01/bin
but still when i run any gem related command, say “sudo bluepill
status”, it looks for the executable in normal ruby edition instead of
REE

Any ideas?

ubuntu > echo $PATH
/opt/ruby-enterprise-1.8.7-2010.01/bin
/usr/local/sphinx/bin
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin

ubuntu > bluepill
You must run bluepill as root.

ubuntu > sudo bluepill status
sudo: bluepill: command not found

ubuntu > which bluepill
bluepill is /opt/ruby-enterprise-1.8.7-2010.01/bin/bluepill

ubuntu > whereis bluepill
bluepill: /opt/ruby-enterprise-1.8.7-2010.01/bin/bluepill

ubuntu > ruby -v
ruby 1.8.7 (2009-12-24 patchlevel 248) [x86_64-linux], MBARI 0x6770,
Ruby Enterprise Edition 2010.01

ubuntu > rails -v
Rails 2.3.5

ubuntu > gem -v
1.3.5

ubuntu > gem list
actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
blankslate (2.1.2.3)
bluepill (0.0.38)
daemons (1.0.10)
eventmachine (0.12.10)
fastthread (1.0.7)
mysql (2.8.1)
passenger (2.2.14)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)
state_machine (0.9.2)
thin (1.2.7)

ubuntu > /usr/bin/gem list
actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
rubygems-update (1.3.7)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)

sudo ln -s /opt/ruby-enterprise-1.8.7-2010.01/bin/ruby /usr/bin/ruby
sudo ln -s /opt/ruby-enterprise-1.8.7-2010.01/bin/gem /usr/bin/gem
sudo ln -s /opt/ruby-enterprise-1.8.7-2010.01/bin/rake /usr/bin/rake

Ivan N.
[email protected]

more information:

ubuntu > gem environment
RubyGems Environment:

  • RUBYGEMS VERSION: 1.3.5
  • RUBY VERSION: 1.8.7 (2009-12-24 patchlevel 248) [x86_64-linux]
  • INSTALLATION DIRECTORY: /opt/ruby-enterprise-1.8.7-2010.01/lib/
    ruby/gems/1.8
  • RUBY EXECUTABLE: /opt/ruby-enterprise-1.8.7-2010.01/bin/ruby
  • EXECUTABLE DIRECTORY: /opt/ruby-enterprise-1.8.7-2010.01/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86_64-linux
  • GEM PATHS:
    • /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8
    • /home/pratik/.gem/ruby/1.8
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :benchmark => false
    • :backtrace => false
    • :bulk_threshold => 1000
    • “gem” => “–no-ri --no-rdoc”
    • :sources => [“http://gems.rubyforge.org”, “http://
      gems.github.com”]
  • REMOTE SOURCES:

Thanks Ivan, but it still dosent work :frowning:

ubuntu > sudo bluepill status
sudo: bluepill: command not found

-Pratik

Also notice that the gem environment does not reflect the REE version
of Ruby,

RUBY VERSION: 1.8.7 (2009-12-24 patchlevel 248) [x86_64-linux]

On Jun 7, 7:19 am, tispratik [email protected] wrote:

I have ruby normal edition installed in /usr/bin
REE in /opt/ruby-enterprise-1.8.7-2010.01/bin
I have all my application gems installed in /opt/ruby-
enterprise-1.8.7-2010.01/bin
but still when i run any gem related command, say “sudo bluepill
status”, it looks for the executable in normal ruby edition instead of
REE

Any ideas?

sudo will set up its own environment (including its own PATH). You
should be able to set things up so that it includes /opt/ruby-
enterprise-1.8.7-2010.01/bin though

Fred

sudo /opt/ruby-enterprise-1.8.7-2010.01/bin/bluepill

maybe sudo echo $PATH

ubuntu > whereis gem
gem: /usr/bin/gem1.8 /usr/bin/gem /opt/ruby-enterprise-1.8.7-2010.01/
bin/gem

As Ivan suggested, i think its a rubygems problem. I havent installed
rubygems in the REE. Currently it is installed only in normal ruby.
I will install rubygems in REE and uninstall from normal ruby and then
check. Basically keeping only REE.

try check
sudo echo $PATH
sudo which bluepill

On Jun 7, 3:43 pm, tispratik [email protected] wrote:

ubuntu > whereis gem
gem: /usr/bin/gem1.8 /usr/bin/gem /opt/ruby-enterprise-1.8.7-2010.01/
bin/gem

As Ivan suggested, i think its a rubygems problem. I havent installed
rubygems in the REE. Currently it is installed only in normal ruby.
I will install rubygems in REE and uninstall from normal ruby and then
check. Basically keeping only REE.

The REE installer installs rubygems for you (and your whereis output
shows that)

Fred