Beginner: Unable to create the first page

I have create my first ruby applications with the command:

rails rails_space
Then I have created the controller like:
ruby script/generate controller Site index about help
Then started the server:
ruby script/server
I have removed the index.html file from the public directory.Then wrote
the app/views/site/index.rhtml like:

RailsSpace

Welcome to RailsSpace!

Hello World!!

But in its not showing in the http://localhost:3000/

Please help.
– Nabanita

On Aug 2, 7:03 pm, Nabanita S. [email protected]
wrote:

I have create my first ruby applications with the command:> rails rails_space

Then I have created the controller like:> ruby script/generate controller Site index about help

Then started the server:> ruby script/server

I have removed the index.html file from the public directory.Then wrote
the app/views/site/index.rhtml like:
[snip]

But in its not showing in thehttp://localhost:3000/

You have to tell rails that you want the root of your site to be
connected to that controller. You do this by creating a route in
routes.rb, eg

map.root :controller => ‘foo’

will make the root of the site connected to the index action of the
Foo controller.

Fred

You also need to be sure that you are using the correct version of
Rails with the RailsSpace book. RailsSpace does not work perfectly
with the 2.x version of Rails. I just finished going through that
entire book and there are a few tweaks that need to be made, assuming
you are using version 2.x of Rails.

There is a google group for RailsSpace that you might want to join up
on. You can ask some specifics about the book there and the authors of
the book seemed to respond fairly quickly on there.

As for the routes.rb file, you will need to tell Rails what you want
the root of your site to be, just as Frederick has mentioned here.

Good luck with it.

–Cory

On Aug 2, 2:03 pm, Nabanita S. [email protected]

Frederick C. wrote:

On Aug 2, 7:03�pm, Nabanita S. [email protected]
wrote:

I have create my first ruby applications with the command:> rails rails_space

[snip]

But in its not showing in thehttp://localhost:3000/

You have to tell rails that you want the root of your site to be
connected to that controller. You do this by creating a route in
routes.rb, eg

map.root :controller => ‘foo’

will make the root of the site connected to the index action of the
Foo controller.

Fred

yes, I have already done this.
– Nabanita

On Sat, Aug 2, 2008 at 2:03 PM, Nabanita S. <
[email protected]> wrote:

RailsSpace

Welcome to RailsSpace!

Hello World!!

You’ll need to move the template portion out of your view.

In app/views/layouts/application.rhtml:

RailsSpace

Welcome to RailsSpace!

<%= yield %>

And in app/views/site/index.rhtml, ONLY this:

Hello World!!


Tim

CPerry wrote:

You also need to be sure that you are using the correct version of
Rails with the RailsSpace book. RailsSpace does not work perfectly
with the 2.x version of Rails. I just finished going through that
entire book and there are a few tweaks that need to be made, assuming
you are using version 2.x of Rails.

There is a google group for RailsSpace that you might want to join up
on. You can ask some specifics about the book there and the authors of
the book seemed to respond fairly quickly on there.

As for the routes.rb file, you will need to tell Rails what you want
the root of your site to be, just as Frederick has mentioned here.

Good luck with it.

–Cory

On Aug 2, 2:03�pm, Nabanita S. [email protected]

I’m using 1.8.6-26 version of Ruby.
I’ve installed it using the command:
gem install rails --include-dependencies.
– Nabanita

Nabanita S. wrote:

CPerry wrote:

You also need to be sure that you are using the correct version of
Rails with the RailsSpace book. RailsSpace does not work perfectly
with the 2.x version of Rails. I just finished going through that
entire book and there are a few tweaks that need to be made, assuming
you are using version 2.x of Rails.

There is a google group for RailsSpace that you might want to join up
on. You can ask some specifics about the book there and the authors of
the book seemed to respond fairly quickly on there.

As for the routes.rb file, you will need to tell Rails what you want
the root of your site to be, just as Frederick has mentioned here.

Good luck with it.

–Cory

On Aug 2, 2:03�pm, Nabanita S. [email protected]

I’m using 1.8.6-26 version of Ruby.
I’ve installed it using the command:
gem install rails --include-dependencies.
– Nabanita

It gives the following error:

MissingSourceFile in SiteController#index
no such file to load – sqlite3
This error occurred while loading the following files:
sqlite3

Tim G. wrote:

On Sat, Aug 2, 2008 at 2:03 PM, Nabanita S. <
[email protected]> wrote:

RailsSpace

Welcome to RailsSpace!

Hello World!!

You’ll need to move the template portion out of your view.

In app/views/layouts/application.rhtml:

RailsSpace

Welcome to RailsSpace!

<%= yield %>

And in app/views/site/index.rhtml, ONLY this:

Hello World!!


Tim

Hi Tim,
I have tried this,but do not work. The http://localhost:3000/ shows
the following message:
“MissingSourceFile in SiteController#index”
Please help.
– Nabanita

You need to install the sqlite gem and library. There are plenty of
howtos around for that.

Sent from my iPhone

On 4 Aug 2008, at 05:43, Nabanita S. <rails-mailing-list@andreas-

Nabanita S. wrote:

Frederick C. wrote:

On Aug 2, 7:03�pm, Nabanita S. [email protected]
wrote:

I have create my first ruby applications with the command:> rails rails_space

[snip]

But in its not showing in thehttp://localhost:3000/

You have to tell rails that you want the root of your site to be
connected to that controller. You do this by creating a route in
routes.rb, eg

map.root :controller => ‘foo’

will make the root of the site connected to the index action of the
Foo controller.

Fred

yes, I have already did this.

It gives the following error:

MissingSourceFile in SiteController#index
no such file to load – sqlite3
This error occurred while loading the following files:
sqlite3
– Nabanita