I would like to give my users an opportunity to switch the application into a sandboxmode, where it is possible to play with it without the danger to insert junk into the database. I guess, setting RAILS_ENV = ''development'' works globally for the whole server. Is there a possibility to switch a single session to development? -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
err , just add another connection to your database.yml file and create a clone db , i dont remember who to switch environment without restarting the webserver. On Fri, Sep 10, 2010 at 4:44 AM, Fritz Trapper <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I would like to give my users an opportunity to switch the application > into a sandboxmode, where it is possible to play with it without the > danger to insert junk into the database. > > I guess, setting RAILS_ENV = ''development'' works globally for the whole > server. Is there a possibility to switch a single session to > development? > -- > Posted via http://www.ruby-forum.com/. > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
anyway what you may be able to do is change the db connection. On Fri, Sep 10, 2010 at 7:49 AM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> err , just add another connection to your database.yml file and create a > clone db , i dont remember who to switch environment without restarting the > webserver. > > > On Fri, Sep 10, 2010 at 4:44 AM, Fritz Trapper <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>wrote: > >> I would like to give my users an opportunity to switch the application >> into a sandboxmode, where it is possible to play with it without the >> danger to insert junk into the database. >> >> I guess, setting RAILS_ENV = ''development'' works globally for the whole >> server. Is there a possibility to switch a single session to >> development? >> -- >> Posted via http://www.ruby-forum.com/. >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >> . >> 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
radhames brito wrote:> anyway what you may be able to do is change the db connection.How to do this? Does it work for a single session, while other sessions work in production mode? Is it possible to switch the current session to sandbox mode and back? -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
what i am afraid that will be a problem are plug ins and gems, you could add a filter in the action controller and stuff, but i think that the plguins and gem may not follow On Fri, Sep 10, 2010 at 8:16 AM, Fritz Trapper <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> radhames brito wrote: > > anyway what you may be able to do is change the db connection. > > How to do this? > > Does it work for a single session, while other sessions work in > production mode? Is it possible to switch the current session to sandbox > mode and back? > -- > Posted via http://www.ruby-forum.com/. > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Fri, Sep 10, 2010 at 9:09 AM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> what i am afraid that will be a problem are plug ins and gems, you could > add a filter in the action controller and stuff, but i think that the > plguins and gem may not follow > > > On Fri, Sep 10, 2010 at 8:16 AM, Fritz Trapper <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>wrote: > >> radhames brito wrote: >> > anyway what you may be able to do is change the db connection. >> >> How to do this? >> >> Does it work for a single session, while other sessions work in >> production mode? Is it possible to switch the current session to sandbox >> mode and back? >> -- >> Posted via http://www.ruby-forum.com/. >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >> . >> 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
read this , this guy had your prbblem http://www.mail-archive.com/rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org/msg45941.html On Fri, Sep 10, 2010 at 9:09 AM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Fri, Sep 10, 2010 at 9:09 AM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> what i am afraid that will be a problem are plug ins and gems, you could >> add a filter in the action controller and stuff, but i think that the >> plguins and gem may not follow >> >> >> On Fri, Sep 10, 2010 at 8:16 AM, Fritz Trapper <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>wrote: >> >>> radhames brito wrote: >>> > anyway what you may be able to do is change the db connection. >>> >>> How to do this? >>> >>> Does it work for a single session, while other sessions work in >>> production mode? Is it possible to switch the current session to sandbox >>> mode and back? >>> -- >>> Posted via http://www.ruby-forum.com/. >>> >>> -- >>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >>> . >>> 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
radhames brito wrote:> read this , this guy had your prbblem > http://www.mail-archive.com/rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org/msg45941.htmlVery interesting. Thanks a lot. -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fritz Trapper wrote:> I would like to give my users an opportunity to switch the application > into a sandboxmode, where it is possible to play with it without the > danger to insert junk into the database. > > I guess, setting RAILS_ENV = ''development'' works globally for the whole > server. Is there a possibility to switch a single session to > development?I don''t think you want to do that. I think you want to create a clone of your *production* environment (call it sandbox or something) with a separate database, then have a completely separate instance of the application running with RAILS_ENV set to ''sandbox''. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser wrote:> I don''t think you want to do that. I think you want to create a clone > of your *production* environment (call it sandbox or something) with a > separate database, then have a completely separate instance of the > application running with RAILS_ENV set to ''sandbox''.Thats probably the safe version of the feature without experiments with unknown results... In which source file is RAILS_ENV defined to the current einvironment? -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.