Unable to get started with Rails

software development

#1

I’ll be the first to admit I’m new to Ruby on Rails. I was excited about getting started with this new (to me) technology, but after about 16 hours of fighting with it, I’m about ready to switch back to PHP for life.

I’ve tried all the Wiki suggestions, I’ve read through the forums, and I’ve searched the far reaches of the web for an answer, but so far nothing seems to work. I’m hoping someone can point me in the right direction before I abandon hope and switch hosting providers.

Here’s what I’ve done:

[list=1]
[]Set up a new subdomain - http://myproject.previewsite.us
[
]Configured said domain to use Passenger (and PHP 5.2 FastCGI by default) - more on this later…
[]Generated the base application using “rails generate myproject.previewsite.us
[
]I can see Rails is up and running (yay!) by visiting the domain.
[]I’ve tried generating views, models, controllers, scaffolds - everything comes up 404. Even the “rails/info/properties” page on the “Welcome Aboard” page refuses to run.
[
]Delete the domain - figuring I messed up somewhere in the configuration or something, and try again from step one.
[/list]

At one point, I was able to get a scaffold to almost work. I configured the database.yaml file to point to my mysql database, I generated the scaffold, migrated the database, and everything seemed to be working (I could see the new tables in the database, and all was well) but when I tried to load the scaffold, I would continuously get “table not found” in the sqllite database, and I wasn’t sure how to get it to see the correct mysql database, even though it created the table structure.

Looking at the Passenger Wiki - this should be “set it and forget it”, but that doesn’t seem to be the case.

I’ve also tried the setup recommended in the FastCGI wiki entry, but no luck there either.

I thought perhaps it was a problem with FastCGI and Passenger working together - so I set the domain to use CGI or mod_php - both without success.

I’m running out of ideas, and I’m just hoping someone has some they might be able to share.

Any help would be appreciated.


#2

Have you checked the logs to see what errors are generated?


#3

I have -

“Started GET “/rails/info/properties” for 68.188.34.218 at Wed May 04 06:18:11 -0700 2011
ActionController::RoutingError (No route matches “/rails/info/properties”):”


#4

Are you sure you uploaded everything as necessary to the right location? Could your routes file be missing?


#5

I’m not up to speed with rails 3 (which I assume is what you are running) but when I was running my Rails 2 app on DH, I think that running “touch tmp/restart.txt” would solve this problem