Portable Ruby on Rails environment for Windows

2019-05-14 09:52发布

Somenone asked the same question about two years ago. The answer was InstantRails at that time. But InstantRails seems to be out of date.

Are there any other solutions?

4条回答
神经病院院长
2楼-- · 2019-05-14 10:24
  • Choose and create a directory to contain the portable environment ENV_DIR
  • Download the ruby binary from RubyInstaller and put it on directory ENV_DIR\ruby
  • Download the Development Kit extractor from RubyInstaller and extract it on directory ENV_DIR\devkit

Create a script: ENV_DIR\setpaths.batwith the commands:

@set PATH=%PATH%;%cd%\ruby\bin
@set PATH=%PATH%;%cd%\devkit\bin
@set PATH=%PATH%;%cd%\devkit\mingw\bin
@set PATH=%PATH%;%cd%\devkit\mingw\libexec\gcc\mingw32\4.5.2
@set PATH=%PATH%;%cd%\devkit\mingw\mingw32\bin
@set PATH=%PATH%;%cd%\devkit\sbin\awk

Create a script: ENV_DIR\console.bat with the commands:

@cmd /K setpaths.bat

Now you can now run the console.bat executable and have a console in which you can create and run Rails projects.

Source: http://hcettech.blogspot.pt/2012/05/windows-portable-rails-development.html

查看更多
祖国的老花朵
3楼-- · 2019-05-14 10:25

I just heard about an Instant Rails VM that Engineyard made using Vagrant-- it's an Ubuntu virtual box with rails all set up and ready to go. I haven't tried it yet though.

As much as I wish Rails ran better on Windows, giving up and using an Ubuntu VM may be the best thing for your purposes-- it would be very self contained.

查看更多
我想做一个坏孩纸
4楼-- · 2019-05-14 10:32

Bitnami offers both native and virtual stacks for popular platforms, you might check these out.

查看更多
相关推荐>>
5楼-- · 2019-05-14 10:36

This question is a bit old at this point in time but I stumbled upon it searching for a similar question today.

The current state of the art appears to be rubyinstaller.org Both Puppet and Chef are using this runtime on windows.

The runtime takes the form of an installation package, so it's not necessarily USB stick portable, but it does give you the option to install to various directories. You should be able to simply copy C:\RubyXXX to your USB stick, change your %PATH% appropriately and run with it.

Hope this information helps.

查看更多
登录 后发表回答