Problem adding new controllers to bitnami JRuby stack

Keywords: Ruby - Amazon Web Services - Technical issue - Other
Description:
jruby -S rails new APPNAME
cd APPNAME
jruby -S rails generate controller Name

Hi @jordanbroudy02,

Could you please let us know more information about the issue you are running into?

  • Which version of Jruby do you have?
  • What error message are you getting?
  • Did you modify any configuration file since you launched the instance? Did you create any other controller previously?

Thanks

JRuby version is 9.1.16.0

After bitnami has lanuched the JRuby instance in the aws cloud I run the following commands
through putty

jruby -S rails new APPNAME
cd APPNAME
jruby -S rails generate controller sm

I recieve the following error:

	LoadError: no such file to load -- active_record/connection_adapters/sqlite3/explain_pretty_printer                                                                                                                                   
Followed by a list of dependencies:
           	require at org/jruby/RubyKernel.java:956
  	block in require at /opt/bitnami/jruby/lib/ruby/gems/1.9/gems/activesupport-3.                                                                                                                                                             2.22/lib/active_support/dependencies.rb:251
   	load_dependency at /opt/bitnami/jruby/lib/ruby/gems/1.9/gems/activesupport-3.                                                                                                                                                             2.22/lib/active_support/dependencies.rb:236
           require at /opt/bitnami/jruby/lib/ruby/gems/1.9/gems/activesupport-3.                                                                                                                                                             	2.22/lib/active_support/dependencies.rb:251
            <main> at /opt/bitnami/jruby/lib/ruby/gems/1.9/gems/activerecord-jdb                                                                                                                                                             	c-adapter-50.0/lib/arjdbc/sqlite3/adapter.rb:9
           require at org/jruby/RubyKernel.java:956
  	block in require at /opt/bitnami/jruby/lib/ruby/gems/1.9/gems/activesupport-3.                                                                                                                                                             2.22/lib/active_support/dependencies.rb:251
   	load_dependency at /opt/bitnami/jruby/lib/ruby/gems/1.9/gems/activesupport-3.                                                                                                                                                             2.22/lib/active_support/dependencies.rb:236
           require at /opt/bitnami/jruby/lib/ruby/gems/1.9/gems/activesupport-3.                                                                                                                                                             	2.22/lib/active_support/dependencies.rb:251
            <main> at /opt/bitnami/jruby/lib/ruby/gems/1.9/gems/activerecord-jdb                                                                                                                                                             	c-adapter-50.0/lib/arjdbc/sqlite3.rb:1
           require at org/jruby/RubyKernel.java:956
  	block in require at /opt/bitnami/jruby/lib/ruby/gems/1.9/gems/activesupport-3.                                                                                                                                                             2.22/lib/active_support/dependencies.rb:251
   load_dependency at /opt/bitnami/jruby/lib/ruby/gems/1.9/gems/activesupport-3.                                                                                                                                                             	2.22/lib/active_support/dependencies.rb:236
	           require at /opt/bitnami/jruby/lib/ruby/gems/1.9/gems/activesupport-3.                                                                                                                                                             2.22/lib/active_support/dependencies.rb:251
            	<main> at /opt/bitnami/jruby/lib/ruby/gems/1.9/gems/activerecord-jdb                                                                                                                                                             	c-adapter-50.0/lib/arjdbc/sqlite3.rb:2
           require at org/jruby/RubyKernel.java:956
   block in (root) at /opt/bitnami/jruby/lib/ruby/gems/1.9/gems/activerecord-jdb                                                                                                                                                             	csqlite3-adapter-50.0/lib/activerecord-jdbcsqlite3-adapter.rb:1
              	each at org/jruby/RubyArray.java:1735
   block in (root) at /opt/bitnami/jruby/lib/ruby/gems/1.9/gems/activerecord-jdb                                                                                                                                                             	csqlite3-adapter-50.0/lib/activerecord-jdbcsqlite3-adapter.rb:3
              	each at org/jruby/RubyArray.java:1735
            	(root) at /opt/bitnami/jruby/lib/ruby/gems/1.9/gems/bundler-1.15.1/l                                                                                                                                                             	ib/bundler/runtime.rb:1
           	require at /opt/bitnami/jruby/lib/ruby/gems/1.9/gems/bundler-1.15.1/l                                                                                                                                                             	ib/bundler/runtime.rb:82
            	<main> at /opt/bitnami/jruby/lib/ruby/gems/1.9/gems/bundler-1.15.1/l                                                                                                                                                             	ib/bundler/runtime.rb:77
           	require at org/jruby/RubyKernel.java:956
            	<main> at /opt/bitnami/jruby/lib/ruby/gems/1.9/gems/bundler-1.15.1/l                                                                                                                                                             	ib/bundler/runtime.rb:66
           	require at org/jruby/RubyKernel.java:956
            	<main> at script/rails:6

No I did not modify any configuration files.
This issue has prevented me from creating any new controllers.

Thanks

Hi,

I was able to reproduce the issue. It looks to me that the latest version of activerecord-jdbcsqlite3-adapter is not compatible with the default activerecord gem. In order to workaround it, I did the following:

cd APPNAME
rm Gemfile.lock
nano Gemfile

In the editor, find the activerecord-jdbcsqlite3-adapter and change it so it ends like this:

gem 'activerecord-jdbcsqlite3-adapter', '1.3.24'

Then execute this command:

jruby -S bundle install

The command should work now without issues.

Best regards,

Javier J. Salmerón


Was my answer helpful? Click on :heart:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.