[英]Cannot load RJB (Ruby Java Bridge) on Windows
using 使用
require 'rjb'
in IRB returns "true", but 在IRB中返回“ true”,但是
require 'rjb'
in my application returns 在我的申请表中
cannot load such file -- rjb
Including 'rjb' into Gemfile does not solve the problem. 在Gemfile中包含“ rjb”并不能解决问题。 What's wrong?
怎么了?
require "rubygems"
does not help. 没有帮助。
rjb is installed. rjb已安装。
I have Ruby 1.9.3 我有Ruby 1.9.3
Edit Gemfile of your project in this way, add a string: 以这种方式编辑项目的Gemfile,添加一个字符串:
gem 'rjb', '1.4.7' <- put version of installed rjb gem
Then save Gemfile and do 然后保存Gemfile并执行
bundle install
PS Sorry for my English =) PS对不起,我的英语=)
Depending on the version of Ruby you're using, you will require to load RubyGems first: 根据您使用的Ruby版本,您将需要先加载RubyGems:
require "rubygems"
require "rjb"
You can check if rjb
was installed as a gem using gem list rjb
from a console. 您可以使用控制台上的
gem list rjb
检查rjb
是否已作为gem安装。
Without more details about the version of Ruby you're using, guess this is the best I could answer it. 如果没有有关您所使用的Ruby版本的更多详细信息,请猜测这是我能回答的最好的方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.