I think I''m missing a step here, but they don''t seem to cover this in the AWDWR book... does anybody know the various steps required to switch from development to production mode in Rails? I''ve scoured the application and changed everything that stands out, but the damn thing is still running off the development database and won''t connect to the production one. Or more accurately, since the production database is empty, it won''t "break" for me. -- Posted via http://www.ruby-forum.com/.
sean colquhoun wrote:> I think I''m missing a step here, but they don''t seem to cover this in > the AWDWR book... does anybody know the various steps required to switch > from development to production mode in Rails? I''ve scoured the > application and changed everything that stands out, but the damn thing > is still running off the development database and won''t connect to the > production one. Or more accurately, since the production database is > empty, it won''t "break" for me.this is in environment.rb: # Uncomment below to force Rails into production mode when # you don''t control web/app server and can''t set it the proper way # ENV[''RAILS_ENV''] ||= ''production'' but I don''t think that''s the proper way. I''m pretty sure it''s just a setting in a config file somewhere like this though. -- Posted via http://www.ruby-forum.com/.
sean colquhoun
2006-May-12 07:35 UTC
[Rails] Re: switching from development to production?
> this is in environment.rb: > > # Uncomment below to force Rails into production mode when > # you don''t control web/app server and can''t set it the proper way > # ENV[''RAILS_ENV''] ||= ''production'' > > but I don''t think that''s the proper way. I''m pretty sure it''s just a > setting in a config file somewhere like this though.Yeah, see that''s the strange part. I did that, and it''s still working. I don''t think I''ve set it properly. There wouldn''t be anyone around who happens to know the "proper" way, would there? -- Posted via http://www.ruby-forum.com/.
Anthony Carlos
2006-May-12 15:25 UTC
[Rails] Re: switching from development to production?
What OS are you running on? Do you have an environment variable RAILS_ENV set? On May 12, 2006, at 3:35 AM, sean colquhoun wrote:> >> this is in environment.rb: >> >> # Uncomment below to force Rails into production mode when >> # you don''t control web/app server and can''t set it the proper way >> # ENV[''RAILS_ENV''] ||= ''production'' >> >> but I don''t think that''s the proper way. I''m pretty sure it''s just a >> setting in a config file somewhere like this though. > > Yeah, see that''s the strange part. I did that, and it''s still > working. I > don''t think I''ve set it properly. There wouldn''t be anyone around who > happens to know the "proper" way, would there? > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
sean colquhoun wrote:> Yeah, see that''s the strange part. I did that, and it''s still working. I > don''t think I''ve set it properly. There wouldn''t be anyone around who > happens to know the "proper" way, would there?Did you restart your server after changing the configuration? The environment is only read on start up. script/server -e production -- Ray
sean colquhoun
2006-May-15 03:10 UTC
[Rails] Re: switching from development to production?
Ray Baxter wrote:> sean colquhoun wrote: > >> Yeah, see that''s the strange part. I did that, and it''s still working. I >> don''t think I''ve set it properly. There wouldn''t be anyone around who >> happens to know the "proper" way, would there? > > > Did you restart your server after changing the configuration? The > environment is only read on start up. > > script/server -e production > > -- > > RayHoly s**t. It worked! What does "script/server -e production" do? I was just using script/server as always. I didn''t know you had to specify anything in the command line to set it as well. -- Posted via http://www.ruby-forum.com/.
Jon Gretar Borgthorsson
2006-May-15 04:30 UTC
[Rails] Re: switching from development to production?
I beleive the built in web server in rails works differently than when you deploy on Apache. On 5/14/06, sean colquhoun <seancolquhoun@gk-a.com> wrote:> Ray Baxter wrote: > > sean colquhoun wrote: > > > >> Yeah, see that''s the strange part. I did that, and it''s still working. I > >> don''t think I''ve set it properly. There wouldn''t be anyone around who > >> happens to know the "proper" way, would there? > > > > > > Did you restart your server after changing the configuration? The > > environment is only read on start up. > > > > script/server -e production > > > > -- > > > > Ray > > Holy s**t. It worked! What does "script/server -e production" do? I was > just using script/server as always. I didn''t know you had to specify > anything in the command line to set it as well. > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- -------------- Jon Gretar Borgthorsson http://www.jongretar.net/
sean colquhoun
2006-May-15 04:39 UTC
[Rails] Re: Re: switching from development to production?
J?n Borg??rsson wrote:> I beleive the built in web server in rails works differently than when > you deploy on Apache. >Good point. Would there be an equivalent necessary step when setting it up on Apache? -- Posted via http://www.ruby-forum.com/.
Jon Gretar Borgthorsson
2006-May-16 22:13 UTC
[Rails] Re: Re: switching from development to production?
Nobb... When using Apache then the enviroment.rb step you did should work, On 5/15/06, sean colquhoun <seancolquhoun@gk-a.com> wrote:> J?n Borg??rsson wrote: > > I beleive the built in web server in rails works differently than when > > you deploy on Apache. > > > > Good point. Would there be an equivalent necessary step when setting it > up on Apache? > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- -------------- Jon Gretar Borgthorsson http://www.jongretar.net/