【发布时间】:2013-01-28 22:21:29
【问题描述】:
我必须从 Ruby 脚本(版本 1.9.3)执行 Rails 服务器(Rails 版本:2.3.4,Ruby 版本:1.8.7)。 我的红宝石脚本是:
system(start G:/app/Ruby187/bin/ruby.exe G:/app/name_app/script/server)
当我启动这个脚本时,我得到了这个结果:
Missing the Rails 2.3.4 gem. Please `gem install -v=2.3.4 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.
但是我在 ruby 解释器 1.8.7 上安装了那个 gem。事实上,如果我在提示符下执行这个命令:
G:/app/Ruby187/bin/ruby.exe G:/app/name_app/script/server
Rails 服务器启动。 我检查了环境变量(因为我的脚本在 Ruby 193 上运行)但没有,输出是相同的错误。
你有什么想法吗?
【问题讨论】:
-
试试这个
system("G:/app/Ruby187/bin/ruby.exe G:/app/name_app/script/server") -
对不起,它不起作用,它的输出与脚本提示符相同。
标签: ruby-on-rails ruby ruby-on-rails-2 ruby-1.9.3