简体   繁体   English

jruby与鸣鸟和tomcat和windows在轨道上

[英]jruby on rails with warbler and tomcat and windows

I tried to deploy an application.war file into webapps/ in the tomcat folder and started up the server. 我试图将application.war文件部署到tomcat文件夹中的webapps /中,并启动了服务器。 When i try to open http://localhost:8080/relConnections it shows on the screen that "something went wrong". 当我尝试打开http://localhost:8080/relConnections它在屏幕上显示“出现问题”。 I deleted the common index.html in the public folder in usual rails apps and tchanged the root to my home page. 我删除了常用Rails应用程序公用文件夹中的公共index.html,并将根目录更改为我的主页。

When i see the log file it says the following: 当我看到日志文件时,它显示以下内容:

"An exception happened during JRuby-Rack startup private method `gsub' called for nil:NilClass
--- System
jruby 1.6.7" 

and three or four more excecption saying the same lines gsub nil:NilClass for all of those. 还有三到四个例外,所有这些都用相同的行gsub nil:NilClass。

Here is my Gemfile 这是我的宝石文件

source 'http://rubygems.org'

gem 'jruby-jars', '1.6.7'
gem 'warbler', '1.3.2'
gem 'rails', '3.1.3'
gem 'rake', '0.9.2.2'

gem 'jruby-openssl', '0.7.5', :platforms => :jruby
gem 'json', '1.6.5', :platforms => [:jruby, :mingw, :mingw_19]
gem 'therubyrhino', :platforms => :jruby

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'activerecord-jdbc-adapter', '1.2.2'
gem 'activerecord-oracle_enhanced-adapter', '1.4.0'

gem 'mechanize', '1.0.0'
gem 'nokogiri', '1.5.0'

group :assets do
  gem 'sass-rails',   '~> 3.1.4'
  gem 'coffee-rails', '~> 3.1.1'
  gem 'uglifier', '>= 1.0.3'
end 

gem 'jquery-rails'
group :development do
  gem 'ruby-debug-base', '0.10.4'
  gem 'ruby-debug-ide', '0.4.17.beta8'
  gem 'pry', '0.9.7.4'
end

group :test do
  gem 'turn', '0.8.3', :require => false
  gem 'minitest', '2.11.0'
  gem 'timecop', '0.3.5'
end
gem 'jruby-pageant', '~>1.0.2'

gem 'net-ssh', '~>2.5.2'

And here is my warble.rb 这是我的warble.rb

Warbler::Config.new do |config|
  #commented code
  config.dirs = %w(app config lib log vendor tmp)
  #more commented code
end

Let me know if iam missing any gems or anything else here. 让我知道我是否在这里错过任何宝石或其他物品。 Thanks 谢谢

I think you may try to set the jruby version to 1.9. 我认为您可以尝试将jruby版本设置为1.9。 In the warble.rb 在warble.rb中

config.webxml.jruby.compat.version = "1.9"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM