Forum: Ruby on Rails switching from development to production?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Sean C. (Guest)
on 2006-05-12 05:31
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.
Jason P. (Guest)
on 2006-05-12 11:27
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.
Sean C. (Guest)
on 2006-05-12 11:35
> 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?
Anthony C. (Guest)
on 2006-05-12 19:27
(Received via mailing list)
What OS are you running on? Do you have an environment variable
RAILS_ENV set?
Ray B. (Guest)
on 2006-05-12 20:08
(Received via mailing list)
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 C. (Guest)
on 2006-05-15 07:09
Ray B. 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.
Jón B. (Guest)
on 2006-05-15 08:33
(Received via mailing list)
I beleive the built in web server in rails works differently than when
you deploy on Apache.


On 5/14/06, sean colquhoun <removed_email_address@domain.invalid> wrote:
> >
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Sean C. (Guest)
on 2006-05-15 08:39
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?
Jón B. (Guest)
on 2006-05-17 02:16
(Received via mailing list)
Nobb... When using Apache then the enviroment.rb step you did should
work,

On 5/15/06, sean colquhoun <removed_email_address@domain.invalid> wrote:
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
This topic is locked and can not be replied to.