On Feb 9, 11:25 am, bingo bob <[email protected]>
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to