I''m using fastercsv such that in my rake file I''m doing this. require ''fastercsv'' It works fine on my Mac. I need to freeze this gem into the app though so my rake tasks work on the production machine. ----------- I spent about two hours though this weekend trying to get this Gem "frozen" into the vendor/gems folder. I tried all sorts, I ... - added a line to environment.rb - used rake:freeze:gems - used rake:install:gems - used rake:unpack:gems - used rake:install:gem gem=''fastercsv'' Basically used all sorts of variations of the above. Any tips for gettting this done? cheers bb -- 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 -~----------~----~----~----~------~----~------~--~---
don''t know if this is still working, but you could give it a try: http://gemsonrails.rubyforge.org/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ok, thanks, that does look interesting (a little old). Thing is though - I thought I''d be able to do it with the rake tasks I have! e.g. - used rake:freeze:gems - used rake:install:gems - used rake:unpack:gems - used rake:install:gem gem=''fastercsv'' Any other factors that could be blocking this working? -- 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 -~----------~----~----~----~------~----~------~--~---
I made a little progress.. I went to vendor/ mkdir gems went in there and unpacked fastercsv....sent it to my webhost... However on the webhost the line require ''fastercsv'' still fails. I read on joyent knoweldeg base running this in environment.rb might do it... config.load_paths += Dir["#{RAILS_ROOT}/vendor/gems/**"].map do |dir| File.directory?(lib = "#{dir}/lib") ? lib : dir end Will that code above solve the problem, claims to search within vendor/gems! bb -- 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 -~----------~----~----~----~------~----~------~--~---
well, i just looked at it again. you''re right: "rake gems:unpack" should provide exactly the functionality you''re looking for. however i don''t know why it''s failing for you. and on that snippet of yours: try it and tell us whether it''s working or not. looks promising. On 9 Feb., 17:25, bingo bob <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I made a little progress.. > I went to vendor > mkdir gems > went in there > and unpacked fastercsv....sent it to my webhost... > > However on the webhost the line require ''fastercsv'' still fails. > > I read on joyent knoweldeg base running this in environment.rb might do > it... > > config.load_paths += Dir["#{RAILS_ROOT}/vendor/gems/**"].map do |dir| > File.directory?(lib = "#{dir}/lib") ? lib : dir > end > > Will that code above solve the problem, claims to search within > vendor/gems! > > bb > -- > 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 -~----------~----~----~----~------~----~------~--~---
well, i just looked at it again. you''re right: "rake gems:unpack" should provide exactly the functionality you''re looking for. however i don''t know why it''s failing for you. and on that snippet of yours: try it and tell us whether it''s working or not. looks promising. On 9 Feb., 17:25, bingo bob <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I made a little progress.. > I went to vendor > mkdir gems > went in there > and unpacked fastercsv....sent it to my webhost... > > However on the webhost the line require ''fastercsv'' still fails. > > I read on joyent knoweldeg base running this in environment.rb might do > it... > > config.load_paths += Dir["#{RAILS_ROOT}/vendor/gems/**"].map do |dir| > File.directory?(lib = "#{dir}/lib") ? lib : dir > end > > Will that code above solve the problem, claims to search within > vendor/gems! > > bb > -- > 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 -~----------~----~----~----~------~----~------~--~---
Who did you configure your gem dependency? My environment.rb looks like this: config.gem "resource_controller", :version => ''0.5.3'' config.gem "rubyist-aasm", :version => ''2.0.4'' config.gem "paperclip", :version => ''2.1.2'' I remember that without specifying the version rake gems:unpack would not work properly... On Mon, Feb 9, 2009 at 2:25 PM, bingo bob <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>wrote:> > I made a little progress.. > I went to vendor/ > mkdir gems > went in there > and unpacked fastercsv....sent it to my webhost... > > However on the webhost the line require ''fastercsv'' still fails. > > I read on joyent knoweldeg base running this in environment.rb might do > it... > > config.load_paths += Dir["#{RAILS_ROOT}/vendor/gems/**"].map do |dir| > File.directory?(lib = "#{dir}/lib") ? lib : dir > end > > Will that code above solve the problem, claims to search within > vendor/gems! > > bb > -- > 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 -~----------~----~----~----~------~----~------~--~---
I put config.gem "fastercsv", :version => "1.4.0" in environment.rb --- btw, i tried the code above on my webhost to search and find gems but no dice - it still errors. so still not there... -- 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 -~----------~----~----~----~------~----~------~--~---
On Feb 9, 11:25 am, bingo bob <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I made a little progress.. > I went to vendor/ > mkdir gems > went in there > and unpacked fastercsv....sent it to my webhost... > > However on the webhost the line require ''fastercsv'' still fails. > > I read on joyent knoweldeg base running this in environment.rb might do > it... > > config.load_paths += Dir["#{RAILS_ROOT}/vendor/gems/**"].map do |dir| > File.directory?(lib = "#{dir}/lib") ? lib : dir > end > > Will that code above solve the problem, claims to search within > vendor/gems! >That code *may* work, but it will probably confuse the gem loader a little. The problem you''re having is that the 2.2 vendor gem handling stuff isn''t loaded until the environment is; if your rake task looks like this: task "do_something" => :environment do end Then move the require line *inside* the task, which should pick up the unpacked gem. Hope this helps! --Matt Jones --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
you nailed it, thanks! I dropped the previous code and went with your method. thanks again. -- 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 -~----------~----~----~----~------~----~------~--~---