开发者

Single App or Separate Apps for Development/Production in Rails

开发者 https://www.devze.com 2023-03-20 07:29 出处:网络
I\'m using Bluehost and I\'m relatively new to Rails (and Ruby).Here\'s my current setup: One app on my local HD

I'm using Bluehost and I'm relatively new to Rails (and Ruby). Here's my current setup:

  • One app on my local HD
  • Two apps on cPanel

    /rails_apps/myAppDev on "dev.myApp.com"

    /rails_apps/myAppPro on "myApp.com"

Do I really have to keep ftping the开发者_开发百科 same local file(s) to both the dev and production apps or is there something about rails environments that I'm not understanding?


If you use Passenger, you can have one application available in two different environments (here is a discussion you might find useful). I am not claiming this is the only way to do it - but it is the only one I am aware of.

Other than that, check the configuration file (config/environment.rb, if I am not mistaken) (see this question) - although I am afraid this will require you to restart your app server every time you make a change and make your app available in only one environment at a time.

Aside from that, I think it is a good idea to test your app in the development mode before switching to production.

I have no idea about Bluehost (I am self-hosting), but I think this should help you a little before someone who knows their service helps you better :)

0

精彩评论

暂无评论...
验证码 换一张
取 消