small medium large xlarge

Generic-user-small
08 May 2013, 15:25
Owen Murphy (11 posts)

“1.3 Preparing Twitalytics for JRuby” (8)

The text suggests changing

platform :ruby do
  gem 'therubyracer'
end

with

platform :jruby do
  gem 'therubyrhino'
end

in the Gemfile. However, the original Gemfile includes version numbers for the MRI gems, and the text does not instruct the reader to remove the version numbers when changing to a JRuby gem. The original block looks like this:

# START:therubyracer
platform :ruby do
  gem 'therubyracer', '0.9.10'
end
# END:therubyracer

and should be changed to

# START:therubyrhino
platform :jruby do
  gem 'therubyrhino'
end
# END:therubyrhino

Similarly the version number should be dropped when changing from a sqlite3 MRI gem to a jdbc-sqlite3 JRuby gem, and from the pg gem to the jdbc-postgres gem.

Generic-user-small
08 May 2013, 15:33
Owen Murphy (11 posts)

The text also suggests running

$ bundler install --without production

after having switched from therubyracer MRI gem to therubyrhino JRuby gem. But this will still fail because of the sqlite3 gem failing (at this point the jdbc drivers have not been sub’ed in), and the rhino interpreter will not be installed if the sqlite3 error is hit first. This install step should be postponed until after the jdbc dependencies have been put in place.

Jruby-conf-profile-mug_pragsmall
13 May 2013, 12:37
Joe Kutner (81 posts)

Sorry for the confusion. The code examples in the book are slightly out of sync with the provided source code because the latter has been updated, but the book text has not. I’m not sure why you’re seeing the sqlite3 build error. It isn’t expected.

  You must be logged in to comment