Mike DeLaurentis
2008-Sep-12 13:30 UTC
Problem using "rake gems:*" with mongrel_cluster, ruby-oci8, and sqlite3-ruby
I''m having trouble using the environment.rb file to manage my gem dependencies for certain gems. For example, I added "config.gem mongrel_cluster" to my environment.rb file, and then installed it through "rake gems install", and it seemed to work fine: + sudo rake gems:install Password: (in /home/mdelaurentis/src/longview-web) gem install mongrel_cluster Bulk updating Gem source index for: http://gems.rubyforge.org/ Successfully installed mongrel_cluster-1.0.5 1 gem installed But then when I use "rake gems" to list the gems, I get this "no such file to load error", and the list of gems shows mongrel_cluster as not being installed: [mdelaurentis-lin:~/src/longview-web] + sudo rake gems (in /home/mdelaurentis/src/longview-web) no such file to load -- mongrel_cluster /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'' ---- Snip ---- [I] rcov [I] ar-extensions [I] json [I] daemons [I] mongrel [I] capistrano [I] gem_plugin [ ] mongrel_cluster As you can see, some of the gems work just fine. I''ve only seen this problem with mongrel_cluster, sqlite3, and ruby-oci8. I''m using Ruby 1.8.6 and Rails 2.1.1. Has anyone else encountered this? --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Mike DeLaurentis
2008-Sep-12 17:14 UTC
Re: Problem using "rake gems:*" with mongrel_cluster, ruby-oci8, and sqlite3-ruby
I figured it out. It''s because the configuration was trying to load the mongrel_cluster, ruby-oci8, and sqlite3-ruby libraries through ''require "<gem-name>"''. I needed to specify the name for the library in the environment.rb file, like this: config.gem "mongrel_cluster", :lib => "mongrel_cluster/init" config.gem "ruby-oci8", :lib => "oci8" config.gem "sqlite3-ruby", :lib => "sqlite3" All my other gems had a *.rb file with the same name as the gem, but these three don''t, so the :lib option must be used. On Sep 12, 9:30 am, Mike DeLaurentis <delauren...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m having trouble using the environment.rb file to manage my gem > dependencies for certain gems. For example, I added "config.gem > mongrel_cluster" to my environment.rb file, and then installed it > through "rake gems install", and it seemed to work fine: > > + sudo rake gems:install > Password: > (in /home/mdelaurentis/src/longview-web) > gem install mongrel_cluster > Bulk updating Gem source index for:http://gems.rubyforge.org/ > Successfully installed mongrel_cluster-1.0.5 > 1 gem installed > > But then when I use "rake gems" to list the gems, I get this "no such > file to load error", and the list of gems shows mongrel_cluster as not > being installed: > > [mdelaurentis-lin:~/src/longview-web] > + sudo rake gems > (in /home/mdelaurentis/src/longview-web) > no such file to load -- mongrel_cluster > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require'' > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require'' > > ---- Snip ---- > > [I] rcov > [I] ar-extensions > [I] json > [I] daemons > [I] mongrel > [I] capistrano > [I] gem_plugin > [ ] mongrel_cluster > > As you can see, some of the gems work just fine. I''ve only seen this > problem with mongrel_cluster, sqlite3, and ruby-oci8. I''m using Ruby > 1.8.6 and Rails 2.1.1. > > Has anyone else encountered this?--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Karel Minarik
2008-Oct-10 09:27 UTC
Re: Problem using "rake gems:*" with mongrel_cluster, ruby-oci8, and sqlite3-ruby
Mike, thank you!!, you saved me some complicated workaround around this: config.gem "flickr-fu" $ rake gems These gems that this application depends on are missing: - flickr-fu Run "rake gems:install" to install them. BUT: config.gem "flickr-fu", :lib => ''flickr_fu'' $ rake gems [F] flickr-fu I don''t get why this isn''t stated in the environment.rb examples more clearly. Thanks again, hopefully someone searching this group for something "config.gem problem load gem installed" will find it :) Karel On Sep 12, 7:14 pm, Mike DeLaurentis <delauren...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I figured it out. It''s because the configuration was trying to load > the mongrel_cluster, ruby-oci8, and sqlite3-ruby libraries through > ''require "<gem-name>"''. I needed to specify the name for the library > in the environment.rb file, like this: > > config.gem "mongrel_cluster", :lib => "mongrel_cluster/init" > config.gem "ruby-oci8", :lib => "oci8" > config.gem "sqlite3-ruby", :lib => "sqlite3" > > All my other gems had a *.rb file with the same name as the gem, but > these three don''t, so the :lib option must be used. > > On Sep 12, 9:30 am, Mike DeLaurentis <delauren...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I''m having trouble using the environment.rb file to manage my gem > > dependencies for certain gems. For example, I added "config.gem > > mongrel_cluster" to my environment.rb file, and then installed it > > through "rakegems install", and it seemed to work fine: > > > + sudorakegems:install > > Password: > > (in /home/mdelaurentis/src/longview-web) > > gem install mongrel_cluster > > Bulk updating Gem source index for:http://gems.rubyforge.org/ > > Successfully installed mongrel_cluster-1.0.5 > > 1 gem installed > > > But then when I use "rakegems" to list the gems, I get this "no such > > file to load error", and the list of gems shows mongrel_cluster as not > > being installed: > > > [mdelaurentis-lin:~/src/longview-web] > > + sudorakegems > > (in /home/mdelaurentis/src/longview-web) > > no such file to load -- mongrel_cluster > > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > > `gem_original_require'' > > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > > `require'' > > > ---- Snip ---- > > > [I] rcov > > [I] ar-extensions > > [I] json > > [I] daemons > > [I] mongrel > > [I] capistrano > > [I] gem_plugin > > [ ] mongrel_cluster > > > As you can see, some of the gems work just fine. I''ve only seen this > > problem with mongrel_cluster, sqlite3, and ruby-oci8. I''m using Ruby > > 1.8.6 and Rails 2.1.1. > > > Has anyone else encountered this?--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---