Installing a pre-existing rails app

software development

#1

Hi.
I’ve been having difficulties installing a pre-existing rails app on my server, and I don’t know what to do now to get it to work. Here’s what I did, following the wiki http://wiki.dreamhost.com/Rails :

  • got my app from my svn repository :

[quote]svn export {my svn server} {the app dir}
[/quote]

  • made a fake rails app to copy the dispatch.fcgi as per instructions
  • edited the {the app dir}/public.htaccess to direct it to the dispatch.fcgi as per instructions
  • made a symbolic link to {the app dir} in my domain name root dir as per instructions

What I now get when I connect to http://{my domain name}/{my app dir} is :
Application error
Rails application failed to start properly

I tried to run

[quote]rake db:migrate
[/quote]

and I got :

/usr/bin/rake:17:Warning: require_gem is obsolete. Use gem instead.
(in {the app dir})
rake aborted!
no such file to load – {the app dir}/config/…/vendor/rails/railties/lib/initializer
{the app dir}/Rakefile:4
(See full trace by running task with --trace)

It’s my second server posting experience, so I may have missed some critical step, and I don’t see how to get further.

Has anyone any idea how to get things to work ?


#2

I’m not entirely sure what the problem is, but a couple things that you could try.

Make sure you have the production environment set before you migrate your database (did you create a database from the Dreamhost panel?).

RAILS_ENV=production rake db:migrate (I think that’s the syntax)

You can ignore the gem error as I get that too, and my app is working. Supposedly you can update your own gems to get rid of this error but I haven’t tried it yet.

I might also look at the diffs between your .htaccess and the one that is produced by the Dreamhost rails installation.


#3

(wow, I thought no-one had even noticed this post, thank for the reply)

Anyway, I got over it by packaging my rails app embedding rails and all the gems used, and now it works fine (well, there are still some other minor bugs, but I’ll get over them soon I guess ; nothing I should mention there I think).