Displaying 7 results from an estimated 7 matches for "my_test_controller".
2006 Mar 28
6
blank page output
...9;m new to Ruby and RubyOnRails. I''m running Fedora 4 which comes
with Ruby 1.84-1. I installed rubyonrails, and I''m doing the a sample
program found on
http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=2
I ran ruby script/generate controller MyTest. I edited the file
my_test_controller.rb. Here''s the code I entered
class MyTestController < ApplicationController
def index
render_text "Hello World, my first line of Ruby"
end
end
I save the file. I then ran the browser with the following url
http://127.0.0.1:3000/My_Test/
I get a blank page, no output....
2008 Sep 23
1
Help with "No route matches "/MyTest/" with {:method=>:get}"
I just started working with Ruby. Anyways I can''t seem to figure out
how to have this message disappear. I was reading a tutorial and based
on it, when I type in http://localhost:3000/MyTest/ it should say
whatever I have written down on my my_test_controller.rb file.
I first ran: ruby script\generate controller MyTest
then I edited the my_test_controller.rb file
It currently says:
-------
class MyTestController < ApplicationController
def index
render_text "Please Help"
end
end
-------
I removed the index file from the public f...
2008 Apr 18
1
rails for dummies
Hellos all,
I''m new to this so I have one really stupid question. When I make my
website is the whole thing going to be encoded in
my_test_controller.rb if I do ''ruby script\generate controller MyTest''
as "ONLamp" says to do?
http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=2
Cheers,
Paul
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the...
2005 Jun 23
6
Problems with Hello World
Hello, I''m installed RubyOnRails in my Fedora Core 4 system.
I''ve created an empty web application with:
rails cookbook
then a controller
ruby script/generate controller MyTest
And a file named my_test_controller.rb was created at
cookbook/app/controller directory.
I ''ve written a new method for MyTestController class like:
def index
render_text "Hello World"
end
Finally I''ve started the server:
ruby script/server
Well If I go to http://127.0.0.1:3000 I can see the initi...
2006 Nov 09
0
Apache configuration
...gi [QSA,L]
And change:
AddHandler fastcgi-script .fcgi
to
AddHandler fcgid-script .fcgi
do NOT change the require line as other guides tell you to do.
Hello, World!
1. cd /var/www/rails/cookbook/
2. ruby script/generate controller mytest
3. vi app/controllers/my_test_controller.rb
Change file to read:
class MyTestController < ApplicationController
def index
render_text => "Hello World!"
end
end
4. /sbin/service httpd start
BUT AT LAST IS ACTION CONTROLLER EXCEPTION AND PAGE IS REDIRECTED OTHER
SITES.
THI...
2006 Jan 13
6
rails bug ? metadata lost between page invocation ?
...to show what I mean:
Here is the SimpleObj model (notice the new method ''extra_attr''):
# file app/models/simple_obj
class SimpleObj < ActiveRecord::Base
def extra_attr
"hello"
end
end
Here is the controller
# file app/controllers/my_test_controller.rb
class MyTestController < ApplicationController
def put
MyCache.put
end
def get
MyCache.get
end
end
Here is the cache object:
# file app/my_cache.rb
class MyCache
@@saved_obj = nil
def self.put
@@saved_obj = SimpleO...
2006 Aug 04
0
Proxy from Apache to local Lighttpd instance
....log
2006-08-04 16:23:34: (response.c.111) Response-Header:
HTTP/1.1 404 Not Found
Transfer-Encoding: chunked
Content-Type: text/html
Set-Cookie: _session_id=771f1bb2977865b939344efae0430bcc; path=/
Cache-Control: no-cache
Date: Fri, 04 Aug 2006 14:23:34 GMT
Server: lighttpd/1.4.11
app/controllers/my_test_controller.rb:
class MyTestController < ApplicationController
def index
render_text "Hello ze world"
end
end
What is going wrong here? Any help would be appreciated, if I can''t get this
to work my project fails painfully...
Bart