User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Ruby section within the Web Development category of DaniWeb, a massive community of 457,668 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,766 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Ruby advertiser: SELL YOUR PRODUCT TODAY !
Views: 587 | Replies: 1
Reply
Join Date: Aug 2005
Posts: 3
Reputation: clem_c_rock is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
clem_c_rock clem_c_rock is offline Offline
Newbie Poster

Simple app - problems w/ routes

  #1  
Oct 9th, 2008
Hello,
I'm trying to get the backbone of a rails project up and running on localhost and also on a rails playground hosted site.

On localhost the app runs great and I can call my say/hello w/ either: http://localhost:3000/controller/say/hello or http://localhost:3000/say/hello,

but when I try this on my rails playground site I get this when I call the say/hello like this: http://erichermann.com/say/hello:

ActionView::MissingTemplate (Missing template say/hello.html.erb in view path /home/c73mr0ck/railsapp/app/views):
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_view/template.rb:85:in `raise_missing_template_exception'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_view/template.rb:78:in `set_extension_and_file_name'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_view/template.rb:15:in `initialize'

And I get this when I call the say/hello like this: http://erichermann.com/controller/say/hello:

ActionController::RoutingError (No route matches "/controller/say/hello" with {:method=>:get}):
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/routing/recognition_optimisation.rb:67:in `recognize_path'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/routing/route_set.rb:384:in `recognize'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:148:in `handle_request'
ect.


My controller code looks like this

class SayController < ApplicationController
  def hello
  end
end

And my routes.rb code looks like this:
ActionController::Routing::Routes.draw do |map|
  map.connect ':controller/:action/:id'
  map.connect ':controller/:action/:id.:format'
end

One thing that could be causing a big problem is that on localhost, my rails version is: Rails 1.2.6

and on the Rails Playground hosting the version is: Rails 2.1.1

Any ideas how I can get this to work in both places?

Thanks,
Clem
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Posts: 3
Reputation: clem_c_rock is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
clem_c_rock clem_c_rock is offline Offline
Newbie Poster

Re: Simple app - problems w/ routes

  #2  
Oct 10th, 2008
Now after a bit of tech support I now get this when I go to: http://erichermann.com/say/hello

Code:
Expected /home/c73mr0ck/railsapp/app/controllers/say_controller.rb to define SayController
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:249:in `load_missing_constant'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:452:in `const_missing'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:464:in `const_missing'

and I get this when I go to: http://erichermann.com/controller/say/hello


no route found to match "/controller/say/hello" with {:method=>:get}
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/routing.rb:1325:in `recognize_path'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/routing.rb:1315:in `recognize'
/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/dispatcher.rb:40:in `dispatch'
/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/fcgi_handler.rb:168:in `process_request'

It all seemed so simple at first....
Edit/Delete Message
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Ruby Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Ruby Forum

All times are GMT -4. The time now is 5:11 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC