On Apr 20, 12:36 pm, Colin Law <clan...@googlemail.com> wrote:
> On 20 April 2011 17:21, amritpal pathak <amritpalpath...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
> > I want to enable production enviornment for my appication.The  content of
> > database.yml file is as
>
> >  # 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
>
> >                            I ran "RAILS_ENV=production rake  db:create ",it
> > created a production database.Here is assume that the production enviornment
> > is enable(But i was wrong).Then i created a simple scaffold as.
>
> >                      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)
>
> > How to enable it?
>
> How many times do I have to tell you?
> RAILS_ENV=production rake  db:migrate
> will run the migrations on the production database.

> i ran " RAILS_ENV=production rake
db:create ",it created a production database.I hope now the prduction
enviornment is enable
> If you do not understand or it does not work please say what you are
> having difficulty with.
   Then i ran script/generate scaffold person firstname:string
lastname:string;
                   rake db:migrate(it created a table named"people"
in
production database .Then i put some entries into form and try to
check table at back end(mysql) and did
                              use production
                              select * from people(it gave table is
empty)  why?
but all entries went into amritpal database that is being used in
deveoplement phase,why?

Thanks

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to