How to implement a sandbox

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?

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.

anyway what you may be able to do is change the db connection.

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?

On Fri, Sep 10, 2010 at 9:09 AM, radhames brito [email protected]
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

read this , this guy had your prbblem
http://www.mail-archive.com/[email protected]/msg45941.html

Fritz T. 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
[email protected]

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?

radhames brito wrote:

read this , this guy had your prbblem
http://www.mail-archive.com/[email protected]/msg45941.html

Very interesting. Thanks a lot.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs