JRuby is an open-source Java implementation of the Ruby programming language. It is Ruby for the JVM. Using idiomatic Ruby syntax, JRuby can consume Java classes and libraries with ease.
5
votes
3answers
6k views
How do you round a float to two decimal places in jruby
JRuby 1.6.x. How do you round a float to decimal places in jruby.
number = 1.1164
number.round(2)
The above shows the following error
wrong number of arguments (1 for 0)
How do I round this to 2 ...
0
votes
0answers
19 views
JRuby - how to get WIN32OLE LastError (or Err)
A user-share (\server\username) is automatically created on a windows server for each user-folder created under a special server (\server\path\username). The share is accessible only by the user ...
0
votes
0answers
23 views
No such file to load — sass-rails
I'm trying to deploy a rails application to jruby/tomcat.
The app already runs in jruby with webrick in dev environment.
When deploying to tomcat through warbler I get an error
"no such file to load ...
0
votes
0answers
5 views
JRuby is Ruby implemented on the JVM - what does this mean?
This is a very beginner-ish question.
JRuby is Ruby implemented on the JVM. Does this mean that the process for creation was just creating the Ruby language from scratch, implemented in Java methods ...
0
votes
0answers
18 views
+50
Passing Tomcat servlet context parameters to a warbler-packaged Rails app
I've got a simple Rails app packaged into a ROOT.war with warbler, that I'm trying to deploy to tomcat7 on wheezy. The app basically works - I just drop the ROOT.war into /var/lib/tomcat7/webapps/, ...
1
vote
2answers
30 views
why can't I run em-websocket-server on JRuby?
I'm running JRuby-1.7.3 through rvm. I've successfully installed the em-websocket-server gem. I can verify it's in my current gemset by running $ gem list.
My code is this:
require 'rubygems'
...
0
votes
3answers
38 views
emails not sending in ruby on rails
I did the same thing as in this link http://www.tutorialspoint.com/ruby-on-rails/rails-send-email.htm. it is showing mail sent in output window of net-beans with the message but it is not actually ...
0
votes
0answers
22 views
Malformed version number string java (ArgumentError)
I am getting this problem when starting the server in IntelliJ.
I am using Jruby version 1.3.1 and rails 2.3.2
(Note: I can't upgrade this versions now)
D:\builders\luis\jruby-1.3.1\bin\jruby.exe -e ...
0
votes
0answers
14 views
how to set profiles using parallel_tests gem
How do I specify a cucumber profile when using the parallel tests gem?
If I were to launch cucumber from the command line (using Jruby) I would do
Jruby -S cucumber -p profile_name
and using rake ...
0
votes
0answers
14 views
Getting Selenium::WebDriver::Android::Bridge.new() Errno::ECONNREFUSED Exception: Connection refused - Connection refuse
I am writing scenarios for android in jruby with cucumber-selenium.
But I am getting error:
Selenium::WebDriver::Android::Bridge.new()
Errno::ECONNREFUSED Exception: Connection refused - Connection ...
2
votes
1answer
47 views
Everything is 2 days off rails 3.2.13
Okay this has got to be the oddest rails related issue ever. It was brought to my attention about a month ago when some of our Employees started to notice that everytime the enter a value in a date ...
2
votes
1answer
120 views
pg_ext throws 'C extension initialized against invalid ruby runtime' on jruby (rvm)
I have a project working on Ruby-1.9.3-p392 and i try to load it with Jruby (jruby-head installed with rvm, it is currently jruby 1.7.4.dev (1.9.3p392))
All rake tasks fail with the following trace
...
0
votes
3answers
37 views
Render JSON in Rails
I want to see the following code in json format. When I do so I get a blank page with no content. In the rubymine debugger I have the correct information in json format.
include Java
require ...
1
vote
0answers
12 views
The best way to insert large amount of messages into TorqueBox message queue
what's the fastest way to push millions of messages into HornetQ? I have these both approaches:
1.) My current code, reuses one session for all messages, ca. 2.200 messages per second
time = ...
0
votes
0answers
5 views
JRuby Embed Should I instantiate one ScriptingContainer per request?
I'm embedding JRuby in a java library on a web application using concurrent mode (Single Ruby Runtime), should instantiate one ScriptingContainer per request, or reuse the same instance of the ...