Amazon Ad

Monday, 29 July 2013

sqlite3 NotImplementedError C extension support is not enabled Pass -xcert.enabled=true to JRuby

Hi Folks,

I was working on Ruby on Rails on Windows 7 platform. I was following a tutorial and was stucked when i ran rake routes command to generate the "resource". When i ran "rake routes" command i got the error

"Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
    /Users/nainirajk/.rvm/rubies/jruby-1.7.0/bin/jruby extconf.rb
          NotImplementedError: C extension support is not enabled. Pass -Xcext.enabled=true to JRuby or set JRUBY_OPTS or modify .jrubyrc to enable."

Here is how i was able to solve the problem

Step 1: Open GemFile present in your project folder. Edit the GemFile.

Step 2: Find "gem sqlite3" in the GemFile. Comment the line "gem sqlite3" and after the commented line add gem 'activerecord-jdbcsqlite3-adapter', :require => 'jdbc-sqlite3', :require=>'arjdbc'.

i.e

#gem 'sqlite3'
gem 'activerecord-jdbcsqlite3-adapter', :require => 'jdbc-sqlite3', :require=>'arjdbc'

Step 3.Open a new command prompt window and type "bundle install".

Step 4. After installing all the bundles successfully, run the command related to sqlite3 for e.x "rake routes".

This solved my problem.

Thanks
Ritesh Tandon

No comments:

Post a Comment

Comments are welcome, Please join me on my Linked In account

http://in.linkedin.com/pub/ritesh-tandon/21/644/33b

How to implement Captcha v3 in ASP.NET

 I was facing an issue of dom parsing in my website. I finally resolved it by using Google Captcha V3. Step 1: Get your keys from https:...