How do you use the JRuby gem file - jruby

In the JRuby download page there is a JRuby-jars 9.1.5.0 .gem file. How do you use this file?

Related

jekyll error building page related to kramdown parser

Whenever I run the bundle exec jekyll serve it returns the error
Dependency Error: Yikes! It looks like you don't have kramdown-parser-gfm or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- kramdown-parser-gfm' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!
Liquid Exception: kramdown-parser-gfm in /_layouts/default.html
ERROR: YOUR SITE COULD NOT BE BUILT:
------------------------------------
kramdown-parser-gfm
so, I tried gem install kramdown-parser-gfm, but it returns the same error after that.
I also tried to remove and reinstall the jekyll and bundle, but didn't work either.
jekyll version 3.9.0 Bundler version 2.1.4
I added gem "kramdown-parser-gfm" to the Gemfile and then ran bundle install.
Now the serve command completes successfully.
delete the Gemfile.lock file
go to gem file add gem "kramdown-parser-gfm"
open terminal and give command bundler
after install all packages, in terminal give command bundle exec jekyll serve
I hope application will run properly now.
On Windows
If you open your gemfile, you will notice the following.
gem "jekyll", "~> 3.2.1"
If you have the specific jekyll version and after running "bundler", you will receive the following errors.
Bundler could not find compatible versions for gem "kramdown":
In Gemfile:
jekyll (~> 3.2.1) was resolved to 3.2.1, which depends on
kramdown (~> 1.3)
kramdown-parser-gfm was resolved to 1.1.0, which depends on
kramdown (~> 2.0)
Remove the specific version of jekyll, like so:
gem "jekyll"
Do not forget to add webrick gem to gemfile
gem "webrick"
Run bundler again.
bundler
Finally, serve
bundle exec jekyll serve --livereload
What worked for me was to add:
gem "rexml"
to the Gemfile.

How can I tell jruby-jars to use a patched version of JRuby?

In my rather unique application needs, I've had to make a patch to JRuby-1.7.26. However, I've learned that Warbler (that uses jruby-jars) embeds it's own copy of JRuby into my lib/ directory. How can I configure either Warbler or jruby-jars to consider my patch when it compiles JRuby?
you need to build a custom version of jruby-jars gem (from the JRuby source)
and then specify that version to be used in the Gemfile :
gem 'jruby-jars', '1.7.26.PATCH', require: false

JRuby Installed with rbenv does not add my gem lib directories to the load path

I installed JRuby 1.7.4 using Rbenv. I've installed several gems using gem install GEMNAME from a shell where jruby-1.7.4 was set as the active ruby-- I confirmed after installation that the gems are in fact present in ~/.rbenv/versions/jruby-1.7.4/lib/ruby/gems/shared/gems. But, when I try to require most of my installed gems from jruby, I get an error. Inspection shows that their lib directories are not on the $LOAD_PATH. Shouldn't all the lib dirs in the gem directories I specified above automatically be there? If not, how do I get them to show up there?

jruby: No such file or directory -- rails (LoadError)

I was trying to create a jruby application using jruby -S rails new OSTH_GGG.
But it returns jruby: No such file or directory -- rails (LoadError).
What is the problem?
Make sure the rails gem is installed:
jruby -S gem install rails
See also this answer to get more details on how to get started with JRuby on Rails.

JRuby EventMachine no such file to load

I have intalled EventMachine in JRuby (I am using Win32). When I try the server example, I get an error when
require 'eventmachine'
The error is:
C:\dev\em>jruby server.rb
server.rb:1:in `require': no such file to load -- eventmachine (LoadError)
from server.rb:1
But the gem is installed!
C:\dev\myapp>jruby -S gem install eventmachine
Successfully installed eventmachine-0.12.8-java
1 gem installed
Installing ri documentation for eventmachine-0.12.8-java...
Installing RDoc documentation for eventmachine-0.12.8-java...
Could not find main page README
Could not find main page README
Could not find main page README
Could not find main page README
You need to first load RubyGems,
require 'rubygems'
The gem may not be installed for jruby. Try jgem install eventmachine