Welcome to Working With Rails


Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
simple noob question for anyone with RoR experience...
7 Posts
simple noob question for anyone with RoR experience...

ok so i have ruby 1.87 and rails3.0 running on ubuntu.... i am trying to install amethyst RoR blogging platform.... -> see: http://www.hulihanapplications.com/projects/amethyst

i have NO prior experience with ruby or rails..... intermediate dev experience otherwise...

here's my only problem.....

As far as i can tell, this RoR app should be opening when i go to http://localhost:3000, but all i see is the "Welcome Aboard" default page....... It has to be something really simple.....

I've also tried:



... and get the standard "Routing Error" page

I don't think the installation is supposed to be hard..... The install guide pretty much just says create the databases, configure the login info, rake: dbmigrate and go ftw....... i have done all this and i assume RoR is setup correctly since i've done a hello world app successfully and i see the "welcome aboard" page.......

so what gives?

Here is my routes.rb:

ActionController::Routing::Routes.draw do |map|

map.connect '', :controller => "browse"

map.connect ':controller/service.wsdl', :action => 'wsdl'

map.connect '/tag/:tag' , :controller => "browse", :action => "tag"

map.connect '/:year/:month/:day',

           :controller => 'browse',

           :action     => 'archive',

           :month => nil, :day => nil,

           :requirements => {:year => /\d{4}/, :month => /\d{1,2}/,:day => /\d{1,2}/ }

map.connect ':controller/:action/:id.:format'

map.connect ':controller/:action/:id'

map.simple_captcha '/simple_captcha/:action', :controller => 'simple_captcha'


EDIT: wow i guess i don't know how to post on forums anymore --- this WSIWYG is awful

Mucho thankso

Dustin Johnson

Delete the index.html file inside the public folder in your rails app directory. Make sure you have an index action in one of your controllers or just add a map.root pointing to your desired root action in your routes.rb file.

e.g. map.root :controller => :main, :action => :index

well now that's the strange thing... there is no index.html inside the public folder for this app

i do have an app/views/browse/index.rhtml and an app/views/admin/index.rhtml ----- I know these are the pages i'm looking to get to, but i can't figure out how to pull it up in my browser..... can you look at my routes.rb above and tell me what URL i'm supposed to be using??? .... this app is supposedly already working, you just have to get RoR working first, which i did..... so i don't think i should change anything....... is the example you gave me specific to my app or is that a general example (map.root :controller => :main, :action => :index)

Thanks for your assistance Reymon!!!!

here's another clue...... i think i may have been running the "rails server" command from the wrong folder path......

if i run 'rails server' from the root directory of my hello world app, everything is fine...... BUT.... when i run 'rails server' from THIS app's root directory, the console outputs the man/help/usage text for 'rails', almost like i messed up the syntax of the command.... but i know i didn't......

SO. this is the main deal. Why won't 'rails server' work from my app's root directory?

also noticed........ there is no 'rails' file in my 'script' folder.......... i do have a 'server' file in there that looks about like the same thing.....

renamed the 'server' file to 'rails' and everything works!!!!!!!!!!!!!! thanks for the help!!!!!!!!!!!!!


7 Posts
Login to add your message