This looks like it probably would solve your problem. I've never seen
a Rails host require users to do that, though I'd imagine that some of
the one-size-fits-all hosts out there might suggest it. In general,
anything that loads gems should typically go into your environment.rb
file. The "correct" way of doing that is by adding any additional
paths to config.load_paths in your environment.rb. For example, to
include any gems in vendor/gems/ you would do something like:

config.load_paths += Dir["#{RAILS_ROOT}/vendor/gems/**"].map do |dir|
    File.directory?(lib = "#{dir}/lib") ? lib : dir
end

Assuming that the code your host has provided you works, and assuming
that they build the gem properly (as I said before, the mysql gem has
to be built on the platform that it's going to be used on), then
getting rails to load it via environment.rb make it get loaded.

But judging by the error you've been getting in your logs, the problem
is definitely that your project can't find the mysql gem. And without
it, it can't connect to the database, so your mongrels just die
immediately after starting. (And you get the 500 gateway error that so
many Rails admins are so familiar with. :) )

Hope that helps.

--
Alex Malinovich
Director of Deployment Services

PLANET ARGON, LLC
design // development // hosting

http://www.planetargon.com
http://www.the-love-shack.net [blog]

+1 503 445 2457
+1 877 55 ARGON [toll free]
+1 815 642 4068 [fax]

On Jan 13, 12:22 pm, Dr_Gavin <dr_ga...@hotmail.com> wrote:
> Hi Alex
>
> My host - 600host offers a system wherby you install gems directly by
> selecting from a list.
> The gem then appears on my list of gems.
>
> On closer inspection though, my gems are installed in a specific
> folder:
> ------
> Ruby Gems are are collections of functions that allow you to perform
> tasks in Ruby. You will need to install a Gem before you can use it
> inside a Ruby program.
>
> Note: Gems are installed directly from the RubyForge repository.
>
> Location of Your Ruby Gem(s)
>
> Path: /home/thinkers/ruby/gems
>
> Using Your Ruby Gem(s)
>
> You will need to add /home/thinkers/ruby/gems to the include path.
> You can do this by adding the following code to your script:
>
> $:.push("/home/thinkers/ruby/gems")
>
> --------
>
> any idea where in my script I would add "$:.push("/home/thinkers/ruby/
> gems")" ? You reckon this would solve the problem?
>
> On 13 Jan, 19:43, Alex Malinovich <alex.malinov...@planetargon.com>
> wrote:
>
> > A 500 message typically means that your mongrels are not responding.
> > How did you go about installing the gem? (anything other than "gem
> > install" isn't going to work since the mysql gem requires platform-
> > specific bindings to build properly).
>
> > --
> > Alex Malinovich
> > Director of Deployment Services
>
> > PLANET ARGON, LLC
> > design // development // hosting
>
> >http://www.planetargon.comhttp://www.the-love-shack.net[blog]
>
> > +1 503 445 2457
> > +1 877 55 ARGON [toll free]
> > +1 815 642 4068 [fax]
>
> > On Jan 13, 11:14 am, Dr_Gavin <dr_ga...@hotmail.com> wrote:
>
> > > I have an app I've just managed to lauch but when I visit the homepage
> > > I get an error 500 message
>
> > > On my production log I can see :
>
> > > "MissingSourceFile (no such file to load -- mysql)"
>
> > > I've downloaded the MySQL gem using the means provided by my host by
> > > that hasn't helped.
>
> > > does anybody have a clue how to fix this?
>
> > > the app was built in Rails 2.1 but launched in Rails 2.2 if that
> > > helps?
> > > I updated rails on my machine and all of my tests pass. The app runs
> > > fine on my machine in rails 2.2.2
>
> > > This is my first time deploying and I'd really appeciate some help if
> > > anybody can spare a few minutes?
>
> > > Thanks,
>
> > > Gavin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Deploying Ruby on Rails" group.
To post to this group, send email to rubyonrails-deployment@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-deployment+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-deployment?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to