Server rentals :: NFOservers.com

Forums

All times are UTC - 8 hours



Author Message
 Post subject: Ruby on Rails
PostPosted: Tue Sep 20, 2011 7:09 pm 
Offline
New to forums
New to forums

Joined: Tue Sep 20, 2011 7:01 pm
Posts: 6
Hey, just a question about deploying Ruby on Rails apps.

Apparently you use mod_rails for RoR support. This seems great, except that it appears that I need to edit the httpd.conf file in order to add apps, and given that this is shared webhosting, something tells me that's probably not the best idea. Heck, I don't even know if I can overwrite it (and I'm sure as hell not going to try).

Is there an easier way? The RoR app is at public/wod/railtest/ on slynet (thegoodsirs.net/slynet.co). I also uploaded it to rail_apps/railtest.


Top
 Profile  
 
 Post subject: Re: Ruby on Rails
PostPosted: Tue Sep 20, 2011 10:26 pm 
Offline
Founder
Founder
User avatar

Joined: Thu Apr 18, 2002 11:04 pm
Posts: 10571
Location: Seattle
Passenger automatically detects RoR applications and you don't need to edit the http.conf file for this. Just upload your application and give it its own vhost, and you should be set.

If you don't want to give it its own vhost, you should be able to change RailsBaseURI through .htaccess, though I haven't experimented with this: http://www.modrails.com/documentation/U ... ilsBaseURI

We talk about setting up a sample RoR application here: viewtopic.php?f=19&t=3994


Top
 Profile  
 
 Post subject: Re: Ruby on Rails
PostPosted: Wed Sep 21, 2011 10:24 am 
Offline
New to forums
New to forums

Joined: Tue Sep 20, 2011 7:01 pm
Posts: 6
Thank you very much!


Top
 Profile  
 
 Post subject: Re: Ruby on Rails
PostPosted: Wed Sep 21, 2011 6:46 pm 
Offline
New to forums
New to forums

Joined: Tue Sep 20, 2011 7:01 pm
Posts: 6
Hate to double post, but there seems to be a problem with using databases.

Code:
slynet@hosted3 ~ $ cd ror_apps/charsheets
slynet@hosted3 ~/ror_apps/charsheets $ rake db:create:all
(in /usr/www/slynet/ror_apps/charsheets)
rake aborted!
no such file to load -- sqlite3
slynet@hosted3 ~/ror_apps/charsheets $ gem install sqlite3
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions into the /usr/lib64/ruby/gems/1.8 directory.


At this point, I tried setting up a database and changing my config file to use mysql.

Code:
slynet@hosted3 ~/ror_apps/charsheets $ rake db:create:all
(in /usr/www/slynet/ror_apps/charsheets)
!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.
rake aborted!
no such file to load -- mysql

(See full trace by running task with --trace)
slynet@hosted3 ~/ror_apps/charsheets $ gem install mysql
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions into the /usr/lib64/ruby/gems/1.8 directory.


I don't suppose I'm just doing things really stupidly? Bundling gems is sort of going to be difficult because I'm on a Windows box and the server is on Linux, and installing gems seems to be out of the question.

Do you know if there's anyone using your webhosting who actually has a full out working RoR app I can talk to? Hate bothering you with my idiotic questions.


Top
 Profile  
 
 Post subject: Re: Ruby on Rails
PostPosted: Wed Sep 21, 2011 7:08 pm 
Offline
New to forums
New to forums

Joined: Tue Sep 20, 2011 7:01 pm
Posts: 6
Alright, so from what I've found out:

There's a .gem folder for each user. Which is great. I can use gem install mysql --install-dir /usr/www/slynet/.gem/ruby/1.8 with no problem!

The issue is that rake apparently won't check that folder for the gem.

Sorry for a triplepost, the edit button is currently on hiatus, apparently. I remember reading you temp disabled it to prevent abuse or something, but I forget.


Top
 Profile  
 
 Post subject: Re: Ruby on Rails
PostPosted: Wed Sep 21, 2011 7:25 pm 
Offline
New to forums
New to forums

Joined: Tue Sep 20, 2011 7:01 pm
Posts: 6
Alright, the edit button disappearing after like 2 minutes is very annoying.

ANYWAYS, the solution I posted worked. I just made a huge booboo because I'm an idiot!

If you want a gem, you have to install it to your local dir. Use:

Code:
gem install mysql --install-dir ~/.gem/ruby/1.8
and things should start working.


Top
 Profile  
 
 Post subject: Re: Ruby on Rails
PostPosted: Wed Sep 21, 2011 9:21 pm 
Offline
Founder
Founder
User avatar

Joined: Thu Apr 18, 2002 11:04 pm
Posts: 10571
Location: Seattle
I'm glad you were able to get it working :).

(If phpBB had an option to prevent editing only after a post has been viewed, I would use that instead of a time limit. There may be a plugin for it, but I haven't had time to look around for one or to test one if I did find one.)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
It is currently Sun Oct 26, 2014 1:25 am
Powered by phpBB® Forum Software © phpBB Group