Because my ISP is giving me zero help in fixing a problem I fee is his
problem, I have decided to migrate my code to Heroku.
I attempted a port but the port failed. Oh well, it was worth a try.
So, instead, I did “Hello, world” by doing
rails new ultradedup001
I actually saw the “Welcome aboard” screen at
http://ultradedup001.heroku.com/ (Yay!)
When I then clicked on “About your application’s environment”, I see
“The page you were looking for doesn’t exist.” in what appears to be a
frame. I suspect this is generated in javascript.
When I do a
heroku logs
the relevant lines seem to be
2011-12-18T08:54:59+00:00 app[web.1]: Started GET
“/rails/info/properties” for 67.172.135.123 at 2011-12-18 00:54:59 -0800
2011-12-18T08:54:59+00:00 heroku[router]: GET
ultradedup001.heroku.com/rails/info/properties dyno=web.1 queue=0
wait=0ms service=482ms status=404 bytes=728
2011-12-18T08:54:59+00:00 app[web.1]: ActionController::RoutingError (No
route matches “/rails/info/properties”):
Any thoughts on what I did wrong? Or is the “Welcome aboard” code not
portable to Heroku?
On Dec 18, 9:14am, Ralph S. [email protected] wrote:
When I then clicked on “About your applications environment”, I see
“The page you were looking for doesn’t exist.” in what appears to be a
frame. I suspect this is generated in javascript.
The /rails/info route is only setup in development, so if your heroku
deployment is running in production it’s normal for it not to work.
Fred
Frederick,
FC> On Dec 18, 9:14am, Ralph S. [email protected] wrote:
When I then clicked on “About your applications environment”, I see
“The page you were looking for doesn’t exist.” in what appears to be a
frame. I suspect this is generated in javascript.
FC> The /rails/info route is only setup in development, so if your
heroku
FC> deployment is running in production it’s normal for it not to work.
Could you PLEASE elaborate. Please elaborate, for instance, why the
same code is running in development on my test machine but is running in
production on heroku?
And could you please suggest a fix.
Finally, routes.rb is, to me, very different than the routes.rb that I
am used to.
What I have
ActionController::Routing::Routes.draw do |map|
map.resources :orders
map.resources :home, :only => [:index, :show]
map.resources :signed_in, :only => [:index, :show]
map.connect ‘:controller/:action/:id’
map.connect ‘:controller/:action.html’
map.connect ‘:controller/:action.htm’
map.root :controller => :home
end
is similar to what is taught by Dave T. in Agile Web D. in
Rails.
Is there an (easy) tutorial on how to use the routes sample generated by
the “rails new” command?
Ralph
On Dec 18, 12:48pm, Ralph S. [email protected] wrote:
FC> The /rails/info route is only setup in development, so if your heroku
FC> deployment is running in production it’s normal for it not to work.
Could you PLEASE elaborate. Please elaborate, for instance, why the same code is
running in development on my test machine but is running in production on heroku?
Rails (deliberately) only allows access to the /rails/info controller
when running in development mode. The rest of the time the route that
would allow requests to reach it doesn’t exist so going to /rails/info
will 404.
Fred
Frederick,
Sunday, December 18, 2011, 6:57:20 AM, you wrote:
FC> On Dec 18, 12:48pm, Ralph S. [email protected] wrote:
FC> The /rails/info route is only setup in development, so if your heroku
FC> deployment is running in production it’s normal for it not to work.
Could you PLEASE elaborate. Please elaborate, for instance, why the same code
is running in development on my test machine but is running in production on
heroku?
FC> Rails (deliberately) only allows access to the /rails/info
controller
FC> when running in development mode. The rest of the time the route
that
FC> would allow requests to reach it doesn’t exist so going to
/rails/info
FC> will 404.
Why does Rails deliberately do that?
Ralph
On 18 December 2011 12:48, Ralph S. [email protected] wrote:
…
Is there an (easy) tutorial on how to use the routes sample generated by the
“rails new” command?
Have a look at the rails guide Rails Routing from the Outside In.
Colin
On Dec 18, 4:23pm, Ralph S. [email protected] wrote:
FC> Rails (deliberately) only allows access to the /rails/info controller
FC> when running in development mode. The rest of the time the route that
FC> would allow requests to reach it doesn’t exist so going to /rails/info
FC> will 404.
I assume there’s a fear that the information could be useful to the
attacker. Also since I don’t think anyone ever uses it out of
development there doesn’t seem much point in exposing it. Code that
isn’t run is code that can’t be attacked.
Fred
On Sun, Dec 18, 2011 at 4:48 AM, Ralph S. [email protected]
wrote:
elaborate … why the same code is running in development on my test machine but
is running in production on heroku?
Because that’s the way heroku works. I would imagine it would be a
nightmare for a platform-as-a-service to support the constant reloading
that goes on in development.
And could you please suggest a fix.
“a fix” to what problem?
–
Hassan S. ------------------------ [email protected]
twitter: @hassan