Erwin
2010-Jun-09 21:35 UTC
LoadError: no such file to load -- gem not found in irb, but found in app console
I installed a gem (sudo gem install vzaar) , which is listed now in the gem list : ... gem list rubyist-aasm (2.1.1) SystemTimer (1.2) vzaar (0.2.2.1) xml-simple (1.0.12) in my app I am using this gem, without any problem class Academy::PagesController < ApplicationController require ''hpricot'' require ''vzaar'' ... no problem in the console $ script/console Loading development environment (Rails 2.3.8)>> require ''vzaar''=> [] but when using irb, I get a LoadError... re ''vzaar'' LoadError: no such file to load -- vzaar from (irb):1:in `require'' from (irb):1 what''s wrong with irb ??? here is my gem env gem env RubyGems Environment: - RUBYGEMS VERSION: 1.3.7 - RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [i686- darwin10.3.0] - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8 - RUBY EXECUTABLE: /usr/local/bin/ruby - EXECUTABLE DIRECTORY: /usr/local/bin - RUBYGEMS PLATFORMS: - ruby - x86-darwin-10 - GEM PATHS: - /usr/local/lib/ruby/gems/1.8 - /usr/lib/ruby/gems/1.8 - /Users/yves/.gem/ruby/1.8/gems - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - "gempath" => ["/usr/lib/ruby/gems/1.8", "/Users/yves/.gem/ruby/ 1.8/gems"] - :sources => ["http://gems.rubyforge.org/", "http:// gems.github.com/", "http://gemcutter.org/", "http://gems.github.com", "http://gems.github.com"] - REMOTE SOURCES: - http://gems.rubyforge.org/ - http://gems.github.com/ - http://gemcutter.org/ - http://gems.github.com I notice that GEM_PATH = /usr/local/lib/ruby/gems/1.8 (where are my rails gems but gempath" => ["/usr/lib/ruby/gems/1.8", "/Users/yves/.gem/ruby/1.8/ gems"] any trouble with that ? thanks for your help... -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Perry Smith
2010-Jun-09 22:15 UTC
Re: LoadError: no such file to load -- gem not found in irb, but found in app console
Kad Kerforn wrote:> no problem in the console > $ script/console > Loading development environment (Rails 2.3.8) >>> require ''vzaar'' > => [] > > but when using irb, I get a LoadError... > re ''vzaar'' > LoadError: no such file to load -- vzaar > from (irb):1:in `require'' > from (irb):1 > > what''s wrong with irb ???Did you try doing: require ''rubygems'' before the require of vzaar ? Rails probably does it for you already. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Mariusz Lusiak
2010-Jun-14 12:24 UTC
Re: LoadError: no such file to load -- gem not found in irb, but found in app console
Perry Smith wrote:> Kad Kerforn wrote: > >> no problem in the console >> $ script/console >> Loading development environment (Rails 2.3.8) >>>> require ''vzaar'' >> => [] >> >> but when using irb, I get a LoadError... >> re ''vzaar'' >> LoadError: no such file to load -- vzaar >> from (irb):1:in `require'' >> from (irb):1 >> >> what''s wrong with irb ??? > > Did you try doing: > > require ''rubygems'' > > before the require of vzaar ? Rails probably does it for you already.Hey Kad, did the hint from Perry sort out the problem? You can also use http://help.vzaar.com/ in case you needed any help with the vzaar gem itself. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.