|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Help! No route matches "/site/homepages" with {:method=>:get}Can anyone out there help me with this problem.
No route matches "/site/homepages" with {:method=>:get}I am new to ruby on rails and am unsure about many things I was running my website on a host for some months then suddenly I was getting the above error, which is I believe because the host is running my code in production mode, whereas I was developing my code in development mode on the host. I am on a shared server and cannot restart the server to start in development mode as per usual. I am not ready for full deployment in production mode as yet. is there any way around this problem, to get my code up and running again Is there some changes that I can make in my config files that can solve this problem. Addressing my_site by the url accesses my public_html/index.php which redirects me via a symlink "site" to the "public" directory in my code (rails structure) If I address my_site/site/index.html (the ruby welcome page) I get the same error I can access my_site/index.html (a copy of the ruby welcome page in public_html) OK Another strange thing is that my development log has been receiving the errors, which suggest that I am running in Development mode. My environment.rb is as follows:- ****************************************************** ENV['RAILS_ENV'] ||= 'development' # Specifies gem version of Rails to use when vendor/rails is not present RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION # Bootstrap the Rails environment, frameworks, and default configuration require File.join(File.dirname(__FILE__), 'boot') Rails::Initializer.run do |config| config.action_controller.session = { :session_key => "_myapp_session", :secret =>*********"} *************************************************************************** Other bits of info that might have cause the error is that I developed my website in Rails 1.28 I think and I am in the process of changing the code to be Rails 2.02 compliant, but as I was away when the error occurred and made no changes for several days I do not think this is the problem. Especially as I am not getting past public_html of my domain. Also my rails structure (code) was created in another folder in the root of my domain called rails_apps. This never caused problems for months whilst the site was up and running. Therefore I do not think this is the cause.. Any ideas as to what I can do Don PS I got your email from a g/group Member I do hope you don't mind the contact. |
|
|
Re: Help! No route matches "/site/homepages" with {:method=>:get}RE - "No route matches ..."
If you are converting from Rails 1.2.8 to Rails 2.0.2, the old routes in config/routes.rb may not suffice. Try adding the following, one at a time, to the top of your ActionController::Routing::Routes.draw block and use the first one that works: map.connect 'site/homepages', :condition=>{:method=>:get}, :controller=>'homepages', :action=>'index' map.connect 'site/:controller', :condition=>{:method=>:get} map.connect 'site/:controller/:action', :condition=>{:method=>:get} RE - "shared server" You must certainly have your own Rails server (application). Sharing a machine with others does not mean you don't have your own Rails server. If you development log has been receiving errors, then you're running in development mode. Your app and setup on your host seems like it's in an incredible mess. You may not be able to dirty-patch it to work. Probably not all hosting companies serve Rails users well. Try one that has special support for that, e.g. Joyent. On Sun, May 4, 2008 at 5:18 AM, Don Mapp <don.mapp@...> wrote: Can anyone out there help me with this problem. |
| Free Forum Powered by Nabble | Forum Help |