Difference between revisions of "Rails3"

From DiLab
Jump to: navigation, search
Line 1: Line 1:
{{TocRight}}
{{TocRight}}
Developing for Rails3.
Developing for Rails3.

== Create a new application ==

Test your installation by making a test application

rails new tetsApp
cd testApp
rails server

Now check the http://localhost:3000 in your browser.



== Using Postgres ==
== Using Postgres ==
Line 6: Line 17:
gem install pg
gem install pg


Making a new app
Making a new application
rails -d postgresql my_rails_app
rails -d postgresql my_rails_app



Revision as of 18:37, 28 December 2010

Developing for Rails3.

Create a new application

Test your installation by making a test application

rails new tetsApp
cd testApp
rails server

Now check the http://localhost:3000 in your browser.


Using Postgres

Make sure you have pg gem installed (not the old "postgres" gem)

gem install pg

Making a new application

rails -d postgresql my_rails_app

Your database.yml file

  development:
   adapter: postgresql
   host: localhost
   port: 5432
   username: your_db_username
   password: your_db_password
   database: your_rails_project_development
   schema_search_path: public
   encoding: utf8
   template: template0

More info

Try this: http://wiki.rubyonrails.org/database-support/postgres