Unable to install SQLITE3 using JRuby

I am new to Ruby and use Windows 7. This is a great environment for what I usually use, so I'm having trouble getting a simple project.

After reading a few tutorials, it looks like JRuby is the easiest way to work with windows that I made. Now I'm trying to create a web application from scratch, but I'm confused by this way of working with the shell.

I downloaded sqliste3.def, sqlite3.dll and sqlite3, which I added to: C: JRuby-1.6.4> bin directory. However, now I am trying to install sqlite, but to no avail. Firstly, I would like to know which console environment is used for this. Is it cmd or IRB console?

Whenever I use cmd, the default line is c: \ users \ me>, and I don’t know if this affects how everything should work.

Whenever I try to install SQLITE3, I guess I need to go:

c:\users\me>gem install sqlite3-ruby 

However, I will not go anywhere and get the following error:

 WARNING:JRuby does not support native extensions or the 'mkmf' library very well 

I heard a lot of good things about Ruby, and I'm just trying to create a basic web page with a contact form, but I seem to run into all the problems with setting up a project and just for a ruby. Are there any tutorials that explain how to start a web project with JRuby and Sqlite3 from scratch?

+7
source share
1 answer

As the warning sqlite3-ruby , sqlite3-ruby requires a native C extension, and it does not work with JRuby.

Instead, use activerecord-jdbcsqlite3-adapter .

https://rubygems.org/gems/activerecord-jdbcsqlite3-adapter

See https://github.com/jruby/activerecord-jdbc-adapter

+6
source

All Articles