Hello,
I am certain this is a simple thing. The crazy thing is that last summer I created my first Rails application with some .rjs templates and that still works. But making a new one recently I have become totally stumped. I thought it was something complicated I was doing (update the DOM, insert some HTML...) so I backed way off, created a test application and just tried to do Hello, World. No joy.
MacOS, latest. Rails 2.1.2.
Fire up Mongrel on post 3000. It loads the index.rhtml file just file. Shows me the link which is coded like this:
link_to_remote("Say hello",{:action => 'hello'})
then hello.rjs is just page.alert "Hello!"
Okay, I'm missing the "world" part.
I load the first page and then click on the link. The log says: Processing JavaController#index (for 127.0.0.1 at 2009-01-29 10:23:13) [GET] Session ID: dee44c8f4a7b2ded8b35130b173b5c37 Parameters: {"action"=>:index, "controller"=>"java"} Rendering template within layouts/application Rendering java/index Completed in 0.07462 (13 reqs/sec) | Rendering: 0.07254 (97%) | DB: 0.00000 (0%) | 200 OK [http://localhost/\]
Processing JavaController#index (for 127.0.0.1 at 2009-01-29 10:23:19) [POST] Session ID: BAh7BzoMY3NyZl9pZCIlZjA1NjRjOTZjZTBmNTBmMmQwYjFhN2U1ZmIyYTM0 OWQiCmZsYXNoSUM6J0FjdGlvbkNvbnRyb2xsZXI6OkZsYXNoOjpGbGFzaEhh c2h7AAY6CkB1c2VkewA=--0338e780c3835ee34ea7c407d42824deb09880b7 Parameters: {"authenticity_token"=>"a59d4b5adc4b75d2b1573e23569e157c8f6471f9", "action"=>:index, "controller"=>"java"} Rendering java/index Completed in 0.00281 (356 reqs/sec) | Rendering: 0.00070 (24%) | DB: 0.00000 (0%) | 200 OK [http://localhost/\]
headers in Firebug were: Connection close Date Thu, 29 Jan 2009 18:23:19 GMT Set-Cookie _test_session=BAh7ByIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo %0ASGFzaHsABjoKQHVzZWR7ADoMY3NyZl9pZCIlZjA1NjRjOTZjZTBmNTBmMmQw %0AYjFhN2U1ZmIyYTM0OWQ%3D--f06ff17de7891930dbb01ebce2bc90d476b9d9d6; path=/ Status 200 OK X-Runtime 0.00281 Etag "25d3a7f2cfd3bfe151df328b04ff9b0e" Cache-Control private, max-age=0, must-revalidate Server Mongrel 1.1.5 Content-Type text/html; charset=utf-8 Content-Length 390
What else should I post to help someone clue me in here? Why don't I get the little sheet-dialog dropping down in the browser window saying, "Hello!"?
Thanks, --Colin