I am moving to a Westhost shared CPanel account and I am trying to set
up my environment for my application but there must be something I am
forgetting.
I am installing external gems and trying to use them. curl, xmlsimple
and fsdb
They install ok and 'gem which gemname' finds them, but 'require'
gemname fails
gotgritc@xyz.us [~/]# gem which xmlsimple
/home/gotgritc/ruby/gems/gems/xml-simple-1.1.1/lib/xmlsimple.rb gotgritc@xyz.us [~]# gem which curl
/home/gotgritc/ruby/gems/gems/curl-0.0.9/lib/curl.rb gotgritc@xyz.us [~]# gem which fsdb
/home/gotgritc/ruby/gems/gems/fsdb-0.7.2/lib/fsdb.rb gotgritc@xyz.us [~]# ruby -rubygems -e 'require "xmlsimple.rb"'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original_require': no such file to load -- xmlsimple.rb (LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`require'
from -e:1 gotgritc@xyz.us [~]# ruby -rubygems -e 'require "xmlsimple"'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original_require': no such file to load -- xmlsimple (LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`require'
from -e:1 gotgritc@xyz.us [~]# ruby -rubygems -e 'require "curl"'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original_require': no such file to load -- curl (LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`require'
from -e:1 gotgritc@xyz.us [~]# ruby -rubygems -e 'require "curl.rb"'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original_require': no such file to load -- curl.rb (LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`require'
from -e:1 gotgritc@xyz.us [~]#
The gem cmd you're picking up is from a different ruby install.
Try 'which ruby' vs 'which gem'.
···
On Aug 4, 2012, at 12:19, Tom Moulton <lists@ruby-forum.com> wrote:
I am moving to a Westhost shared CPanel account and I am trying to set
up my environment for my application but there must be something I am
forgetting.
I am installing external gems and trying to use them. curl, xmlsimple
and fsdb
They install ok and 'gem which gemname' finds them, but 'require'
gemname fails
gotgritc@xyz.us [~/]# gem which xmlsimple
/home/gotgritc/ruby/gems/gems/xml-simple-1.1.1/lib/xmlsimple.rb
gotgritc@xyz.us [~]# gem which curl
/home/gotgritc/ruby/gems/gems/curl-0.0.9/lib/curl.rb
gotgritc@xyz.us [~]# gem which fsdb
/home/gotgritc/ruby/gems/gems/fsdb-0.7.2/lib/fsdb.rb
gotgritc@xyz.us [~]# ruby -rubygems -e 'require "xmlsimple.rb"'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original_require': no such file to load -- xmlsimple.rb (LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`require'
from -e:1
gotgritc@xyz.us [~]# ruby -rubygems -e 'require "xmlsimple"'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original_require': no such file to load -- xmlsimple (LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`require'
from -e:1
gotgritc@xyz.us [~]# ruby -rubygems -e 'require "curl"'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original_require': no such file to load -- curl (LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`require'
from -e:1
gotgritc@xyz.us [~]# ruby -rubygems -e 'require "curl.rb"'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original_require': no such file to load -- curl.rb (LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`require'
from -e:1
gotgritc@xyz.us [~]#
And for a SECOND time I am asking for any other suggestion other than
DON'T DO THAT!
Where the hell did I say that? I suggested what I thought the problem was and how to diagnose it.
I do have a feeling your posts may have a very low signal to noise
ratio.
But seriously, do you have anything worth while to suggest to me?
The suggestion I've made TWICE is worthwhile to anyone wanting to diagnose their problem. It might not be worthwhile to you since you seem to want to hear something completely different from what I'm saying.
It is fine as long as you're not trying to run multiple versions of
Ruby or Ruby installed via RVM. But when you do try it, you're in for
a world of hurt.
-- Matma Rex
···
2012/8/8 Tom Moulton <lists@ruby-forum.com>:
James Harrison wrote in post #1071601:
You're running ruby 1.8 and requiring libraries without first using:
require "rubygems"
I did set RUBYOPT=rubygems in the environmant
Both the environment variable and the GEM_HOME variable are described in
And for a SECOND time I am asking for any other suggestion other than
DON'T DO THAT!
Where the hell did I say that? I suggested what I thought the problem
was and how to diagnose it.
Sorry I guess the email -> web interface must have dropped some emails
This is the thread as I saw it:
I see your points.
As I stated in the first post I am on a Westhost shared hosting account
so I do not have root access and they provide a local gems storage...
They are the same install and maybe the environment variable they
suggested is unique to them. (I am not sure if standard gems install
supports local installs with no root access when ruby/gems is installed
with root)
tom
ps. sorry I was a bit rude, I did not consider the email<->forum
interface had flaws
···
On Aug 7, 2012, at 16:28 , Tom Moulton <lists@ruby-forum.com> wrote:
Have you tried requiring rubygems first, to rule out the possibility of
that being the problem?
···
On Tue, Aug 7, 2012 at 5:50 PM, Bartosz Dziewoński <matma.rex@gmail.com>wrote:
2012/8/8 Tom Moulton <lists@ruby-forum.com>:
> James Harrison wrote in post #1071601:
>> You're running ruby 1.8 and requiring libraries without first using:
>>
>> require "rubygems"
>
> I did set RUBYOPT=rubygems in the environmant
>
> Both the environment variable and the GEM_HOME variable are described in
>
> http://docs.rubygems.org/read/chapter/3/
>
> So what is so wrong doing it that way?
>
> What harm could happen from this method?
It is fine as long as you're not trying to run multiple versions of
Ruby or Ruby installed via RVM. But when you do try it, you're in for
a world of hurt.
It is fine as long as you're not trying to run multiple versions of
Ruby or Ruby installed via RVM. But when you do try it, you're in for
a world of hurt.
-- Matma Rex
Well, that makes sense.
The good news is that there is only one SSH account and I am not
going to use it for development, so that sounds like I am safe...