【发布时间】:2016-07-27 00:27:03
【问题描述】:
我已经在 Windows 8 中使用 RailsInstaller 和 postgresql 安装了 Ruby on Rails。我正在尝试使用现有应用程序的文件运行 rails server,但我收到错误消息“JRuby 不支持工作模式或视窗'。
在我的 config/puma.rb 文件中,我将工作人员设置为 0,然后收到有关 Windows 不支持守护程序模式的错误。基本上每次我改变一些东西我都会得到更多的错误。
我已经修复了环境变量、gem 等(就像在其他帖子中一样),例如 Cannot install Puma gem on Ruby on Rails.,有没有希望在 Windows 机器上运行预先存在的内置于 linux 的 RoR 应用程序?
当我为 RoR“博客”示例运行 rails server 时,它运行良好,所以我知道 RoR 肯定可以在 Windows 中运行!
这是我的 -'de-identified' config/puma.rb 文件。是因为在 Windows 中我没有 /var/app 文件夹吗?我玩过目录等无济于事。
`
#!/usr/bin/env puma
# start puma with:
# RAILS_ENV=production bundle exec puma -C ./config/puma.rb
workers 0
theident = 'nameofthing'
application_path = '/var/app/'+ theident + '.address.com.au/current'
railsenv = 'production'
directory application_path
environment railsenv
daemonize false
pidfile "#{application_path}/tmp/pids/puma-#{railsenv}.pid"
state_path "#{application_path}/tmp/pids/puma-#{railsenv}.state"
stdout_redirect"#{application_path}/log/puma-#{theident}.log"
threads 0, 16
bind "unix:///var/run/puma/" + theident + "_app.sock" `
我已将这些目录更改为当前路径,现在正在运行的“rails server”开始运行,但 localhost:3000 是一个无法正常工作的页面。我在 SIGUSR1 不工作、SIGUSR2 不工作等方面遇到错误
【问题讨论】:
标签: ruby-on-rails linux postgresql ruby-on-rails-3 windows-8