What is mean of Deployment?

On 18 April 2011 17:12, amrit pal pathak [email protected]
wrote:

To create the production database
RAILS_ENV=production rake db:migrate
Please tell me in which to specity RAILS_ENV=production.I
didnt
find it in enviornment.rb file

You just run the command
RAILS_ENV=production rake db:create
(note, I made a mistake before, it is db:create not db:migrate)
That sets the environment variable RAILS_ENV to production and runs
rake, then rake db:create checks RAILS_ENV so it knows which section
to use from database.yml and which file to use from
config/environments.

As I pointed out previously did you try googling for
rails create production database
before asking here?

Colin

On Apr 18, 12:30pm, Colin L. [email protected] wrote:

start the server in production mode.

To create the production database
RAILS_ENV=production rake db:migrate
Please tell me in which to specity RAILS_ENV=production.I
didnt
find it in enviornment.rb file

You just run the command
RAILS_ENV=production rake db:create
I ran RAILS_ENV=production and then rake db:create (sussessfully
worked) It created the database with same name as my application name.
is It all done?
There is no need to change the database.yml file’s production
environment settings?

Thanks

As I pointed out previously did you try googling for
rails create production database
before asking here?
I tried but it didn’t help.Thats why i moved here

On 18 April 2011 17:46, amrit pal pathak [email protected]
wrote:


You just run the command
RAILS_ENV=production rake db:create
I ran RAILS_ENV=production and then rake db:create (sussessfully
worked) It created the database with same name as my application name.
is It all done?

Is what all done? It created the db, what more do you expect rake
db:create to do?

There is no need to change the database.yml file's production

environment settings?

If you wanted any changes you should have made them before running
db:create. It will have used the settings under production: from
database.yml.

Colin

On Apr 18, 1:14pm, Colin L. [email protected] wrote:

start the server in production mode.
worked) It created the database with same name as my application name.
is It all done?

Is what all done? It created the db, what more do you expect rake
db:create to do?
I mean it is all i have done to enable production
enviornment?

There is no need to change the database.yml file's production

environment settings?

If you wanted any changes you should have made them before running
db:create. It will have used the settings under production: from
database.yml.

  The changed contents of database.yml file are

SQLite version 3.x

gem install sqlite3-ruby (not necessary on OS X Leopard)

development:
adapter: mysql
database: amritpal
username: root
password: 12345
pool: 5
timeout: 5000

Warning: The database defined as “test” will be erased and

re-generated from your development database when you run “rake”.

Do not set this db to the same as development or production.

test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000

production:
adapter: mysql
database: production
username: root
password: 12345
pool: 5
timeout: 5000

              Now again i ran " RAILS_ENV=production rake

db:create ",it created a production database.I hope now the prduction
enviornment is enable?

Thanks

On 19 April 2011 17:26, amrit pal pathak [email protected]
wrote:

I think the production enviorment is still not enabled.because i when
i tried
script/generate scaffold person firstname:string lastname:string;
rake db:migrate(it created a table named"people" in
amritpal database that is used in development envionrment.But in
production enviornment ,the database production hasn’t any talbe)

Means still i working in development??

As I have tried to explain several times the value of RAILS_ENV
determines which environment will be used when you execute a rake
command. The environment defaults to development. So:

rake db:migrate will migrate the development db.

RAILS_ENV=production rake db:migrate
will migrate the production db.

Colin

I think the production enviorment is still not enabled.because i when
i tried
script/generate scaffold person firstname:string lastname:string;
rake db:migrate(it created a table named"people" in
amritpal database that is used in development envionrment.But in
production enviornment ,the database production hasn’t any talbe)

Means still i working in development??

Thanks