On 20 Apr 2011, at 18:22, amrit pal pathak <[email protected]> wrote:

> 
> 
> On Apr 20, 1:01 pm, Bryan Crossland <[email protected]> wrote:
>> On Wed, Apr 20, 2011 at 11:21 AM, amritpal pathak <[email protected]
>> 
>>> 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?
>> 
>>> Thanks
>> 
>> I believe Colin already discussed with with you in another thread.
>> 
>> "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 "
>> 
>> If you are looking to be always running in production mode and never in any
>> other mode then my advice would be the set the environment variable
>> RAILS_ENV on your system to production.
>> 
>> RAILS_ENV=production
>> 
>> You can look up how to do that for your OS anywhere on the internet.
>      At other thread ,i followed collin instrutions but at last i
> strucked a error to which i didnt receive a reply yet.So i post a new
> thread.Please look at that thread and see if you can help

Next time try looking at the second page of the thread - Colin replied 
yesterday. Even if he hadn't, proliferation of identical threads helps no-one. 

Fred
>       
> http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/d911b888dbd30c58
> 
> 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 [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
> 

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to