Hi guys, This is probably very easy question to answer but is perplexing a newbie ROR guy like me... I have successfully set up a Netbeans, MySQL server and gotten my first RailsApplication1 set up. On my http://localhost:3000 page, I can see that all is set up and well. Clicking on "About your application''s environment" shows me a nice ajax view that says: Ruby version 1.8.6 (i386-mswin32) RubyGems version 0.9.4 Rails version 2.0.2 Active Record version 2.0.2 Action Pack version 2.0.2 Active Resource version 2.0.2 Action Mailer version 2.0.2 Active Support version 2.0.2 Application root C:/work/Prj_ROR/RailsApplication1 Environment development Database adapter mysql My question is - and I have been scratching my head over the past half hour fiddling with various files including the environment.rb file - and I still have no clue HOW to run my local Ruby On Rails App in PRODUCTION mode instead of DEVELOPMENT mode as it is right now... Surely, there must be a simple way to do this? Anyone? Sorry for this really dumb question. Ellils --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Ellis, are you starting your server with ''ruby script/server'' ? If so, you can switch to production mode with: ruby script/server -e production To get the full help, either type : ruby script/server --help You''ll find more explanations here: http://api.rubyonrails.org/ hope this help Thibaut -- LoGeek [blog] http://evolvingworker.com - tools for a better day [blog] http://blog.logeek.fr - about writing software --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi! Thanks. This seems to work. I am getting a different "environment" message now. Instead of saying the whole chunk as mentioned above, it now says: " Routing Error No route matches "/rails/info/properties" with {:method=>:get} " which probably means I have to configure my Route I suppose? Not sure if this is the correct interpretation of what is happening here... Another question would be more pertaining to Netbeans. Thibaut''s method seems to be applicable only if I run ruby script/server -e production in command line. I was wondering how to force the application to be working in production mode while inside Netbeans IDE. I was hoping to do everything within Netbeans IDE and not to have to worry about command line at all. Regards, Ellils On Jan 6, 4:26 pm, "Thibaut Barrère" <thibaut.barr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi Ellis, > > are you starting your server with ''ruby script/server'' ? > > If so, you can switch to production mode with: > ruby script/server -e production > > To get the full help, either type : > ruby script/server --help > > You''ll find more explanations here:http://api.rubyonrails.org/ > > hope this help > > Thibaut > -- > LoGeek > [blog]http://evolvingworker.com- tools for a better day > [blog]http://blog.logeek.fr- about writing software--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I''m going to really simplify this for you: Don''t. There''s no good reason I can think of to run Rails in production mode via Netbeans. Of course, you may have one, but let''s see if we can get around it. Production mode is for production. Models and controllers are cached, and other things work differently but none of those should change how your application behaves code-wise. If you''re trying to get things like page caching and other things to work in development mode, simply see the environments/ folder in the config folder. You can change how each environment works. If you''ve got code that checks for different environment modes and does different things, you should have tests to check that functionality. Let us know if you still need help :) On 1/6/08, ellils <calvin.ellils-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > Hi! > > Thanks. This seems to work. I am getting a different "environment" > message now. Instead of saying the whole chunk as mentioned above, it > now says: > " > Routing Error > No route matches "/rails/info/properties" with {:method=>:get} > " > > which probably means I have to configure my Route I suppose? Not sure > if this is the correct interpretation of what is happening here... > > > Another question would be more pertaining to Netbeans. Thibaut''s > method seems to be applicable only if I run ruby script/server -e > production in command line. I was wondering how to force the > application to be working in production mode while inside Netbeans > IDE. I was hoping to do everything within Netbeans IDE and not to > have to worry about command line at all. > > Regards, > Ellils > > > On Jan 6, 4:26 pm, "Thibaut Barrère" <thibaut.barr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > Hi Ellis, > > > > are you starting your server with ''ruby script/server'' ? > > > > If so, you can switch to production mode with: > > ruby script/server -e production > > > > To get the full help, either type : > > ruby script/server --help > > > > You''ll find more explanations here:http://api.rubyonrails.org/ > > > > hope this help > > > > Thibaut > > -- > > LoGeek > > [blog]http://evolvingworker.com- tools for a better day > > [blog]http://blog.logeek.fr- about writing software > > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Brian, Okay, sounds simple enough :) So whenever I want to view my production mode site, I just have to jump over to DOS and run webrick in production mode. Regards, Ellils On Jan 7, 1:36 am, "Brian Hogan" <bpho...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m going to really simplify this for you: > > Don''t. There''s no good reason I can think of to run Rails in production > mode via Netbeans. Of course, you may have one, but let''s see if we can get > around it. > > Production mode is for production. Models and controllers are cached, and > other things work differently but none of those should change how your > application behaves code-wise. If you''re trying to get things like page > caching and other things to work in development mode, simply see the > environments/ folder in the config folder. You can change how each > environment works. If you''ve got code that checks for different environment > modes and does different things, you should have tests to check that > functionality. > > Let us know if you still need help :) > > On 1/6/08, ellils <calvin.ell...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hi! > > > Thanks. This seems to work. I am getting a different "environment" > > message now. Instead of saying the whole chunk as mentioned above, it > > now says: > > " > > Routing Error > > No route matches "/rails/info/properties" with {:method=>:get} > > " > > > which probably means I have to configure my Route I suppose? Not sure > > if this is the correct interpretation of what is happening here... > > > Another question would be more pertaining to Netbeans. Thibaut''s > > method seems to be applicable only if I run ruby script/server -e > > production in command line. I was wondering how to force the > > application to be working in production mode while inside Netbeans > > IDE. I was hoping to do everything within Netbeans IDE and not to > > have to worry about command line at all. > > > Regards, > > Ellils > > > On Jan 6, 4:26 pm, "Thibaut Barrère" <thibaut.barr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > wrote: > > > Hi Ellis, > > > > are you starting your server with ''ruby script/server'' ? > > > > If so, you can switch to production mode with: > > > ruby script/server -e production > > > > To get the full help, either type : > > > ruby script/server --help > > > > You''ll find more explanations here:http://api.rubyonrails.org/ > > > > hope this help > > > > Thibaut > > > -- > > > LoGeek > > > [blog]http://evolvingworker.com-tools for a better day > > > [blog]http://blog.logeek.fr-about writing software--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Jan 7, 2008 8:44 AM, ellils <calvin.ellils-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi Brian, > > Okay, sounds simple enough :) > > So whenever I want to view my production mode site, I just have to > jump over to DOS and run webrick in production mode. >No, you should be able to view your "production site" in development mode. This way you don''t have to keep restarting your server when you change controllers and models. -- Ryan Bigg http://www.frozenplague.net Feel free to add me to MSN and/or GTalk as this email. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
If you still want to use production mode from within NetBeans, this is described in the following post: http://www.nabble.com/Re%3A-Changing-Mongrel-parameters--p14659714.html -- Tor --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
uncomment in your 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'' On Jan 7, 11:19 pm, Tor Norbye <tor.nor...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> If you still want to use production mode from within NetBeans, this is > described in the following post:http://www.nabble.com/Re%3A-Changing-Mongrel-parameters--p14659714.html > > -- Tor--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---