Ben Oakes
2008-Jun-26 20:48 UTC
Using gems:unpack into vendor/gems still requires the gems to be installed via gems:install
Maybe I''m missing something, but why do gem dependencies that have been unpacked into vendor/gems have to be installed on the machine as well? This doesn''t make much sense to me -- if the gems are already on the machine, why does Rails still tell me to rake gems:install even when a gem is frozen into vendor/gems, but not on the machine? This has become an issue because we want our CruiseControl.rb builds to have the correct gems, but getting them installed automatically is a bit of a pain. (If anyone has a good solution for this, please let me know -- I''m not finding much of anything about these problems.) Thanks for your input. -- Ben --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ivan V.
2008-Jun-26 22:44 UTC
Re: Using gems:unpack into vendor/gems still requires the gems to be installed via gems:install
Ben Oakes wrote:> Maybe I''m missing something, but why do gem dependencies that have > been unpacked into vendor/gems have to be installed on the machine as > well? This doesn''t make much sense to me -- if the gems are already > on the machine, why does Rails still tell me to rake gems:install even > when a gem is frozen into vendor/gems, but not on the machine? > > This has become an issue because we want our CruiseControl.rb builds > to have the correct gems, but getting them installed automatically is > a bit of a pain. (If anyone has a good solution for this, please let > me know -- I''m not finding much of anything about these problems.) > > Thanks for your input. > > -- BenMaybe you need to add something like this to environment.rb: config.load_paths += Dir["#{RAILS_ROOT}/vendor/gems/**"].map do |dir| File.directory?(lib = "#{dir}/lib") ? lib : dir end - Ivan V. -- 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-/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 -~----------~----~----~----~------~----~------~--~---
Ben Oakes
2008-Jun-27 15:44 UTC
Re: Using gems:unpack into vendor/gems still requires the gems to be installed via gems:install
That might do it, but pretty much every rake task would still say gems need to be installed via rake gems:install. (Haven''t tested this though.) -- Ben On Jun 26, 5:44 pm, "Ivan V." <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> BenOakeswrote: > > Maybe I''m missing something, but why do gem dependencies that have > > been unpacked into vendor/gems have to be installed on the machine as > > well? This doesn''t make much sense to me -- if the gems are already > > on the machine, why does Rails still tell me to rake gems:install even > > when a gem is frozen into vendor/gems, but not on the machine? > > > This has become an issue because we want our CruiseControl.rb builds > > to have the correct gems, but getting them installed automatically is > > a bit of a pain. (If anyone has a good solution for this, please let > > me know -- I''m not finding much of anything about these problems.) > > > Thanks for your input. > > > -- Ben > > Maybe you need to add something like this to environment.rb: > > config.load_paths += Dir["#{RAILS_ROOT}/vendor/gems/**"].map do |dir| > File.directory?(lib = "#{dir}/lib") ? lib : dir > end > > - Ivan V. > -- > Posted viahttp://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-/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 -~----------~----~----~----~------~----~------~--~---
Ivan V.
2008-Jun-27 17:43 UTC
Re: Using gems:unpack into vendor/gems still requires the gems to be installed via gems:install
Ben Oakes wrote:> That might do it, but pretty much every rake task would still say gems > need to be installed via rake gems:install. (Haven''t tested this > though.) > > -- Ben > > On Jun 26, 5:44�pm, "Ivan V." <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>If you have your gems frozen, why would you need to require them on your environment? Maybe you can comment them out until Rails can detect when they''re frozen. - Ivan -- 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-/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 -~----------~----~----~----~------~----~------~--~---
Dan Manges
2008-Jun-28 13:42 UTC
Re: Using gems:unpack into vendor/gems still requires the gems to be installed via gems:install
You''re using Rails 2.1, right? Gems that are unpacked shouldn''t need to also be installed on the machine. Are you trying to use a gem like this: require "hpricot" task :some_task_that_needs_hpricot do ... end If so, the problem is that the Rails environment hasn''t loaded to put the gems in vendor/gems into your load path when you''re trying to require "hpricot." If that''s the problem, I would lazy load the gems in tasks that depend on the :environment task. task :hpricot => :environment do require "hpricot" end task :some_task_that_needs_hpricot => :hpricot do ... end -Dan Manges On Jun 26, 3:48 pm, Ben Oakes <benjamin.d.oa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Maybe I''m missing something, but why do gem dependencies that have > been unpacked into vendor/gems have to be installed on the machine as > well? This doesn''t make much sense to me -- if the gems are already > on the machine, why does Rails still tell me to rake gems:install even > when a gem is frozen into vendor/gems, but not on the machine? > > This has become an issue because we want our CruiseControl.rb builds > to have the correct gems, but getting them installed automatically is > a bit of a pain. (If anyone has a good solution for this, please let > me know -- I''m not finding much of anything about these problems.) > > Thanks for your input. > > -- Ben--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---