Error when running rails app incompatible library version rgeo proj4 - ruby-on-rails

When I run foreman start, I get this error:
~/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require': incompatible library version - ~/.rvm/gems/ruby-2.2.3/gems/rgeo-0.4.0/lib/rgeo/coord_sys/proj4_c_impl.bundle (fatal)
from ~/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `block in require'
from ~/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
from ~/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
from ~/.rvm/gems/ruby-2.2.3/gems/rgeo-0.4.0/lib/rgeo/coord_sys.rb:39:in `<top (required)>'
I've tried rvm gemset empty && bundle install, gem uninstall rgeo && gem install rgeo, other people working on this same project don't have this issue.
Ruby 2.2.3p173 Rails 4.2.4 Gem 2.4.8
What am I doing wrong?

I was running into this issue as well. I would need to know more about your environment, but it might be related to this issue I reported to the RGeo project today: https://github.com/rgeo/rgeo/issues/114
If you're using Homebrew's version of Ruby, you might need to uninstall it and use RVM. There seems to be a conflict when you have both running.
I also committed a patch that might work for you. It basically ensures that if you're using a Ruby Manager, RGeo tries to build with those libraries first. You can see that code here: https://github.com/eddietejeda/rgeo/tree/prioritize_ruby_manager_lib
You can add this to your Gemfile to test it out:
gem 'rgeo', :git => 'git#github.com:eddietejeda/rgeo.git', :branch => 'prioritize_ruby_manager_lib'
Hope this helps!

Related

Bundler::RubyVersionMismatch: Your Ruby version is 2.3.1, but your Gemfile specified 2.1.8

Bundler::RubyVersionMismatch: Your Ruby version is 2.3.1, but your Gemfile specified 2.1.8
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/definition.rb:417:in `validate_ruby!'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler.rb:91:in `setup'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/setup.rb:19:in `<top (required)>'
/opt/chef/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/opt/chef/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
bundler: failed to load command: rake (/home/deploy/.bundler/app_name/ruby/2.1.0/bin/rake)
All the places it is showing: 2.1.8
ruby -v ==> 2.1.8
Gemfile has ==> 2.1.8
No idea about where it is taking version 2.3.1 from.
I want to remove 2.3.1 from wherever it is taking it.
Not sure, its an error related to chef setup or ruby installation on server.
Any help would be greatly appreciated.
Your bundle executable apparently is linked to the Ruby shipped with your local Chef installation (which uses Ruby 2.3.1 in this case).
This can happen when chef's executables are in your PATH and you don't have a different version of bundler installed elsewhere.
Assuming that you have a sane PATH, it might be enough to run
gem install bundler
to install the current version of bundler with your own Ruby (that is, the one install in /usr/local rather than in /opt/chef/embedded).

Ruby 2.1.7 on Windows: 'require' error: cannot load such file [duplicate]

When I try to setup basic installation and initiation of server using Rails 4.0.0 on Ruby 2.0.0, I'm facing the following error message.
/usr/local/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
from /usr/local/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7/lib/sqlite3.rb:6:in `rescue in <top (required)>'
from /usr/local/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7/lib/sqlite3.rb:2:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /home/penchal/new/site/config/application.rb:7:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in <top (required)>'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
How can I avoid this error message and proceed further?
Find your sqlite3 gemspec file. One example is /usr/local/share/gem/specifications/sqlite3-1.3.7.gemspec
Windows:
C:\Ruby21\lib\ruby\gems\2.1.0\specifications.
You should adjust according with your Rubygem path and sqlite3 version.
Edit the file above and look for the following line
s.require_paths=["lib"]
change it to
s.require_paths= ["lib/sqlite3_native"]
Since pull request #229 has been merged, sqlite3 can be installed per git: key. It's possible to use sqlite3 easily through this addition in your Gemfile :
gem 'sqlite3', git: "https://github.com/sparklemotion/sqlite3-ruby"
This works on RubyInstaller-2.4 and newer. It automatically installs the required pacman package mingw-w64-x86_64-sqlite3 when you run bundler install.
There are some more hints for Rails on Windows in the RubyInstaller2 FAQ.
see:https://stackoverflow.com/a/39136421/6755206
fortunately, you don't have to switch to ruby 2.0
there is a solution to this issue, after endless trying...
https://github.com/hwding/sqlite3-ruby-win
Steps
Pre
gem uninstall sqlite3 --all
Source
Download the latest sqlite3-ruby, https://github.com/sparklemotion/sqlite3-ruby
unzip the package
Build
run command-line in the extracted dir
make sure you have your C compiler installed and added to PATH
gem install bundler
bundle install
rake native gem
you'll find a dir named 'pkg' generated
Install
enter dir 'pkg'
gem install --local sqlite3-xxx.gem ('xxx' is version code)
Check
irb
require 'sqlite3'
gem uninstall sqlite3 --all
ridk exec pacman -S mingw-w64-x86_64-sqlite3
gem inst sqlite3 --platform ruby
This solved the problem to me.
Windows 10
Ruby 2.5.3
Rails 5.2.2
Just edit Gemfile and add gem 'sqlite3', platform: :ruby.
No compiling of the sources or downloading pre-compiled libraries will solve this problem, believe me I tried everything, the problem lies somewhere else. This is how it works on windows:
bundle update sqlite3
You likely get another similar error after this one regarding nokogiri, fix it with the command:
bundle update nokogiri
Enjoy your Ruby App!
Uninstalling and reinstalling the sqlite3 gem worked for me.
gem uninstall sqlite3
bundle
If the top answer doesn't work, a fix that I discovered is simply going to your Gemfile and adding the version number 1.3.11 (instead of 1.3.9) right after sqlite3. So the line in your Gemfile should now read:
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '1.3.11'
This worked for me:
gem 'sqlite3', git: "https://github.com/larskanis/sqlite3-ruby", branch: "add-gemspec"
BEST OFFICIAL INSTALL
Im using rails 5.2.1p57, Windows 10
Just running following lines sloved the problem
gem uninstall sqlite3
and uninstall all installed versions. again execute following command
gem install sqlite3 --platform=ruby
You are now done.
Let me know if problem persist.
I had the same error when I upgrade my Ruby version to 2.5.X. I tracked with rails task --trace that the sqlite3 is not available to version 2.5, than I change my GemFile the gem "sqlite3" change to "sqlite3-ruby", after I uninstall the gem "sqlite3" and finally I run the bundle install.
I don't know what is the reason... I read that "sqlite3" is not available for ruby 2.5 yet, but I'm not sure.
To avoid this error, ensure that gem sqlite3 is added to your Gemfile.
Then extract "exe"s and "dll"s from Sqlite download link to Ruby's bin folder.
If problem still persists. Try this:
bundle update
gem uninstall sqlite3
Given a choice between multiple versions of sqlite3, choose last option 'All versions'. Enter last number here
Select gem to uninstall:
1. sqlite3-1.3.13
2. sqlite3-1.3.13-x64-mingw32
3. All versions
>3
.
.
If you remove this gem, these dependencies will not be met.
Continue with Uninstall? [yN]
>
y
gem install sqlite3 --platform=ruby
rails s
This should work.
Read through this link for more explanation if above works for you.
This happened to me as well. It turned out that I had originally installed SQLite 1.3.10, but then I copied some gems from the Rails tutorial screencasts project and it listed SQLite 1.3.9. Then I got the same error you did. I changed it back to 1.3.10 and it worked.
(This is on Windows 7. I was running the screencast tutorial on Cloud9 IDE).
This is the only solution worked for me, derived from this GitHub issue post:
Get autoconf version of sqlite3 sources from https://www.sqlite.org/download.html.
Start MSYS shell.
In unpacked location for your sqlite3, configure static version only to avoid keeping DLL on PATH: ./configure --disable-shared.
Build and install it: make install DESTDIR=/c/dev/ruby/tmp. You can change the directory.
Open command prompt of windows and run gem uninstall sqlite3 --all to remove all existing sqlite3 gems.
Again on command prompt of windows, build and install sqlite3 gem: gem install sqlite3 --platform=ruby -- --with-sqlite3-include=C:\dev\ruby\tmp\usr\local\include --with-sqlite3-lib=C:\dev\ruby\tmp\usr\local\lib. Those include and lib directories may be different, so check at first.
I am using Ruby version 2.5.1 and Rails version 5.2.0 on Windows 10.
i found it! i saw this https://www.youtube.com/watch?v=lsrzvX0qzmA
i instaled:
Rails version: 5.2.1
Ruby version: 2.5.3 (x64-mingw32)
Sqlite version 1.3.13
and i have your problem...
my solution:
In your installing folder like C:\Ruby25-x64\lib\ruby\gems\2.5.0\gems\
you have folders:
"sqlite3-1.3.13"
"sqlite3-1.3.13-x64-mingw32"
Find file
C:\Ruby25-x64\lib\ruby\gems\2.5.0\gems\sqlite3-1.3.13\lib\sqlite3\sqlite3_native.so
Copy it in C:\Ruby25-x64\lib\ruby\gems\2.5.0\gems\sqlite3-1.3.13-x64-mingw32\lib\sqlite3\2.5\sqlite3_native.so
(may be folders not exist - create and paste)
Updated
Adding the below to the Gemfile fixed for me:
gem 'sqlite3', '1.4.0', platforms: :ruby
Change your sqlite3 gem in the Gemfile for this:
gem 'sqlite3', git: "https://github.com/larskanis/sqlite3-ruby", branch: "add-gemspec"
Then run:
bundle install
For OSX users, this can result from using a ruby manager (e.g. rvm).
If you edit your ~/.bash_profile and add this:
[[ "$APP" = *"/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/"* ]] && {
echo Xcode detected
rvm use system
}
You can work around the issue. Restart Xcode before attempting to build again.
The actual issue is tracked here: https://openradar.appspot.com/28726736).
Full credit goes to: https://egeek.me/2018/04/14/ipa-export-error-in-xcode-and-ruby/
I had the same probe but its quite simple,
gem uninstall sqlite3 --all
then run
gem install sqlite3
everything should work well from there.
I tried:
sudo apt-get install sqlite3
Then I tried:
gem install sqlite3
And it worked

cannot load such file -- sqlite3/sqlite3_native (LoadError) on ruby on rails

When I try to setup basic installation and initiation of server using Rails 4.0.0 on Ruby 2.0.0, I'm facing the following error message.
/usr/local/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
from /usr/local/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7/lib/sqlite3.rb:6:in `rescue in <top (required)>'
from /usr/local/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7/lib/sqlite3.rb:2:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /home/penchal/new/site/config/application.rb:7:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in <top (required)>'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
How can I avoid this error message and proceed further?
Find your sqlite3 gemspec file. One example is /usr/local/share/gem/specifications/sqlite3-1.3.7.gemspec
Windows:
C:\Ruby21\lib\ruby\gems\2.1.0\specifications.
You should adjust according with your Rubygem path and sqlite3 version.
Edit the file above and look for the following line
s.require_paths=["lib"]
change it to
s.require_paths= ["lib/sqlite3_native"]
Since pull request #229 has been merged, sqlite3 can be installed per git: key. It's possible to use sqlite3 easily through this addition in your Gemfile :
gem 'sqlite3', git: "https://github.com/sparklemotion/sqlite3-ruby"
This works on RubyInstaller-2.4 and newer. It automatically installs the required pacman package mingw-w64-x86_64-sqlite3 when you run bundler install.
There are some more hints for Rails on Windows in the RubyInstaller2 FAQ.
see:https://stackoverflow.com/a/39136421/6755206
fortunately, you don't have to switch to ruby 2.0
there is a solution to this issue, after endless trying...
https://github.com/hwding/sqlite3-ruby-win
Steps
Pre
gem uninstall sqlite3 --all
Source
Download the latest sqlite3-ruby, https://github.com/sparklemotion/sqlite3-ruby
unzip the package
Build
run command-line in the extracted dir
make sure you have your C compiler installed and added to PATH
gem install bundler
bundle install
rake native gem
you'll find a dir named 'pkg' generated
Install
enter dir 'pkg'
gem install --local sqlite3-xxx.gem ('xxx' is version code)
Check
irb
require 'sqlite3'
gem uninstall sqlite3 --all
ridk exec pacman -S mingw-w64-x86_64-sqlite3
gem inst sqlite3 --platform ruby
This solved the problem to me.
Windows 10
Ruby 2.5.3
Rails 5.2.2
Just edit Gemfile and add gem 'sqlite3', platform: :ruby.
No compiling of the sources or downloading pre-compiled libraries will solve this problem, believe me I tried everything, the problem lies somewhere else. This is how it works on windows:
bundle update sqlite3
You likely get another similar error after this one regarding nokogiri, fix it with the command:
bundle update nokogiri
Enjoy your Ruby App!
Uninstalling and reinstalling the sqlite3 gem worked for me.
gem uninstall sqlite3
bundle
If the top answer doesn't work, a fix that I discovered is simply going to your Gemfile and adding the version number 1.3.11 (instead of 1.3.9) right after sqlite3. So the line in your Gemfile should now read:
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '1.3.11'
This worked for me:
gem 'sqlite3', git: "https://github.com/larskanis/sqlite3-ruby", branch: "add-gemspec"
BEST OFFICIAL INSTALL
Im using rails 5.2.1p57, Windows 10
Just running following lines sloved the problem
gem uninstall sqlite3
and uninstall all installed versions. again execute following command
gem install sqlite3 --platform=ruby
You are now done.
Let me know if problem persist.
I had the same error when I upgrade my Ruby version to 2.5.X. I tracked with rails task --trace that the sqlite3 is not available to version 2.5, than I change my GemFile the gem "sqlite3" change to "sqlite3-ruby", after I uninstall the gem "sqlite3" and finally I run the bundle install.
I don't know what is the reason... I read that "sqlite3" is not available for ruby 2.5 yet, but I'm not sure.
To avoid this error, ensure that gem sqlite3 is added to your Gemfile.
Then extract "exe"s and "dll"s from Sqlite download link to Ruby's bin folder.
If problem still persists. Try this:
bundle update
gem uninstall sqlite3
Given a choice between multiple versions of sqlite3, choose last option 'All versions'. Enter last number here
Select gem to uninstall:
1. sqlite3-1.3.13
2. sqlite3-1.3.13-x64-mingw32
3. All versions
>3
.
.
If you remove this gem, these dependencies will not be met.
Continue with Uninstall? [yN]
>
y
gem install sqlite3 --platform=ruby
rails s
This should work.
Read through this link for more explanation if above works for you.
This happened to me as well. It turned out that I had originally installed SQLite 1.3.10, but then I copied some gems from the Rails tutorial screencasts project and it listed SQLite 1.3.9. Then I got the same error you did. I changed it back to 1.3.10 and it worked.
(This is on Windows 7. I was running the screencast tutorial on Cloud9 IDE).
This is the only solution worked for me, derived from this GitHub issue post:
Get autoconf version of sqlite3 sources from https://www.sqlite.org/download.html.
Start MSYS shell.
In unpacked location for your sqlite3, configure static version only to avoid keeping DLL on PATH: ./configure --disable-shared.
Build and install it: make install DESTDIR=/c/dev/ruby/tmp. You can change the directory.
Open command prompt of windows and run gem uninstall sqlite3 --all to remove all existing sqlite3 gems.
Again on command prompt of windows, build and install sqlite3 gem: gem install sqlite3 --platform=ruby -- --with-sqlite3-include=C:\dev\ruby\tmp\usr\local\include --with-sqlite3-lib=C:\dev\ruby\tmp\usr\local\lib. Those include and lib directories may be different, so check at first.
I am using Ruby version 2.5.1 and Rails version 5.2.0 on Windows 10.
i found it! i saw this https://www.youtube.com/watch?v=lsrzvX0qzmA
i instaled:
Rails version: 5.2.1
Ruby version: 2.5.3 (x64-mingw32)
Sqlite version 1.3.13
and i have your problem...
my solution:
In your installing folder like C:\Ruby25-x64\lib\ruby\gems\2.5.0\gems\
you have folders:
"sqlite3-1.3.13"
"sqlite3-1.3.13-x64-mingw32"
Find file
C:\Ruby25-x64\lib\ruby\gems\2.5.0\gems\sqlite3-1.3.13\lib\sqlite3\sqlite3_native.so
Copy it in C:\Ruby25-x64\lib\ruby\gems\2.5.0\gems\sqlite3-1.3.13-x64-mingw32\lib\sqlite3\2.5\sqlite3_native.so
(may be folders not exist - create and paste)
Updated
Adding the below to the Gemfile fixed for me:
gem 'sqlite3', '1.4.0', platforms: :ruby
Change your sqlite3 gem in the Gemfile for this:
gem 'sqlite3', git: "https://github.com/larskanis/sqlite3-ruby", branch: "add-gemspec"
Then run:
bundle install
For OSX users, this can result from using a ruby manager (e.g. rvm).
If you edit your ~/.bash_profile and add this:
[[ "$APP" = *"/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/"* ]] && {
echo Xcode detected
rvm use system
}
You can work around the issue. Restart Xcode before attempting to build again.
The actual issue is tracked here: https://openradar.appspot.com/28726736).
Full credit goes to: https://egeek.me/2018/04/14/ipa-export-error-in-xcode-and-ruby/
I had the same probe but its quite simple,
gem uninstall sqlite3 --all
then run
gem install sqlite3
everything should work well from there.
I tried:
sudo apt-get install sqlite3
Then I tried:
gem install sqlite3
And it worked

Rails/Ruby Error When Creating Database: Unable to load the EventMachine C extension

Update:
the eventmachine gem is installed and in my gemfile:
eventmachine (1.0.0, 0.12.10)
Please help! Trying to create a database with the following:
Fitzs-MacBook-Pro:twilio_insanity Fitz$ rake db:create'
Returns the following error:
Unable to load the EventMachine C extension; To use the pure-ruby
reactor, require 'em/pure_ruby' rake aborted! cannot load such file --
rubyeventmachine
/Users/Fitz/.rvm/gems/ruby-1.9.3-p327#rails3tutorial2ndEd/gems/eventmachine-1.0.0/lib/eventmachine.rb:8:in
require'
/Users/Fitz/.rvm/gems/ruby-1.9.3-p327#rails3tutorial2ndEd/gems/eventmachine-1.0.0/lib/eventmachine.rb:8:in
'
/Users/Fitz/.rvm/gems/ruby-1.9.3-p327#rails3tutorial2ndEd/gems/thin-1.5.0/lib/thin.rb:7:in
require'
/Users/Fitz/.rvm/gems/ruby-1.9.3-p327#rails3tutorial2ndEd/gems/thin-1.5.0/lib/thin.rb:7:in
'
/Users/Fitz/.rvm/gems/ruby-1.9.3-p327#global/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in
require'
/Users/Fitz/.rvm/gems/ruby-1.9.3-p327#global/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in
block (2 levels) in require'
/Users/Fitz/.rvm/gems/ruby-1.9.3-p327#global/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in
each'
/Users/Fitz/.rvm/gems/ruby-1.9.3-p327#global/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in
block in require'
/Users/Fitz/.rvm/gems/ruby-1.9.3-p327#global/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in
each'
/Users/Fitz/.rvm/gems/ruby-1.9.3-p327#global/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in
require'
/Users/Fitz/.rvm/gems/ruby-1.9.3-p327#global/gems/bundler-1.2.3/lib/bundler.rb:128:in
require'
/Users/Fitz/Desktop/twilio_insanity/config/application.rb:7:in' /Users/Fitz/Desktop/twilio_insanity/Rakefile:5:in
require' /Users/Fitz/Desktop/twilio_insanity/Rakefile:5:in'
/Users/Fitz/.rvm/gems/ruby-1.9.3-p327#rails3tutorial2ndEd/bin/ruby_noexec_wrapper:14:in
eval'
/Users/Fitz/.rvm/gems/ruby-1.9.3-p327#rails3tutorial2ndEd/bin/ruby_noexec_wrapper:14:in
' (See full trace by running task with --trace)
```
try to re-install the gem 'eventmachine'
$ gem uninstall eventmachine
then
$ bundle install ( in the same folder with your Gemfile)
or just
$ gem install eventmachine ( if you are not using the Gemfile)
see: https://stackoverflow.com/a/15140634/445908
Someone kind of answered in comments...see below.
Basically though I had seperate versions of Ruby, which was getting confusing because some gems were only installed on certain versions of ruby.
Fix was totally uninstalling ruby and rails, then reinstalling. Fixed it!
This helped:
This comment in another thread seems promising for your issue. Can you ensure that you have "gem eventmachine" or similar in your Gemfile, and can successfully bundle? – Scott Helm Jan 6 at 6:24
I got the same error on Windows after upgrading ruby from 1.9.3 to 2.4.
I tried every fix I found but the only thing that helped in the end was (not that obvious and therefore hard to find) to reinstall the new Ruby again with 32 bit instead of 64.
Also I installed Eventmachine with
gem install eventmachine --platform=ruby
to force native compilation, since I always get problems with msgpack, that can be solved like this (haven't tried it with the default x86-mingw32)
I am on windows 10. C:\Ruby25-x64\lib\ruby\gems>bundle install showed Could not locate Gemfile error(though, i am having bundle gem installed and present at \gems location). Following worked for me to resolve Unable to load the EventMachine C extension error:
gem uninstall eventmachine
gem install eventmachine --platform ruby
If any of this solutions don't work, try reinstalling eventmachine gem from sources using method that worked for me on OS X: https://stackoverflow.com/a/20950026/83055
Just try the following:
apt-get install libssl0.9.8
It fixed the error on Ubuntu 12.4
Make sure you bundle eventmachine in your Gemfile
gem "eventmachine"
Then bundle install. This comment seemed relevant to you.

Error : 'incompatible library version' sqlite3-1.3.11 in rails

I working on Ubuntu system(16.04).
My problem is whenever i setup any rails project and try to run rails s then i got 'incompatible library version' error for sqlite3 something like below.
/home/jiggs/.rvm/gems/ruby-2.3.1#albumriver/gems/activesupport-4.0.0/lib/active_support/values/time_zone.rb:282: warning: circular argument reference - now
/home/jiggs/.rvm/gems/ruby-2.3.1#albumriver/gems/sqlite3-1.3.11/lib/sqlite3.rb:6:in `require': incompatible library version - /home/jiggs/.rvm/gems/ruby-2.3.1#albumriver/gems/sqlite3-1.3.11/lib/sqlite3/sqlite3_native.so (LoadError)
from /home/jiggs/.rvm/gems/ruby-2.3.1#albumriver/gems/sqlite3-1.3.11/lib/sqlite3.rb:6:in `rescue in <top (required)>'
from /home/jiggs/.rvm/gems/ruby-2.3.1#albumriver/gems/sqlite3-1.3.11/lib/sqlite3.rb:2:in `<top (required)>'
from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:77:in `require'
from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:77:in `block (2 levels) in require'
from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:72:in `each'
from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:72:in `block in require'
from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:61:in `each'
from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:61:in `require'
from /usr/lib/ruby/vendor_ruby/bundler.rb:99:in `require'
from /home/jiggs/sites/albumriverfinal/config/application.rb:7:in `<top (required)>'
from /home/jiggs/.rvm/gems/ruby-2.3.1#albumriver/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require'
from /home/jiggs/.rvm/gems/ruby-2.3.1#albumriver/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in <top (required)>'
from /home/jiggs/.rvm/gems/ruby-2.3.1#albumriver/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from /home/jiggs/.rvm/gems/ruby-2.3.1#albumriver/gems/railties-4.0.0/lib/rails/commands.rb:73:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Rails version : 4.0.0
ruby version i tried with rails 4.0.0 :
ruby-2.0.0-p247 [ x86_64 ]
ruby-2.2.5 [ x86_64 ]
ruby-2.3.0 [ x86_64 ]
ruby-2.3.0-preview1 [ x86_64 ]
ruby-2.3.1 [ x86_64 ]
I trying to uninstall sqlite3 using gem uninstall sqlite3 and trying to run bundle install but got this error :
An error occurred while installing sqlite3 (1.3.11), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling.
Then i run gem install sqlite3 -v '1.3.11' and run rails server and got same error again incompatible library version.
Output of sqlite3 gem install :
gem install sqlite3 -v '1.3.11'
Fetching: sqlite3-1.3.11.gem (100%)
Building native extensions. This could take a while...
Successfully installed sqlite3-1.3.11
Parsing documentation for sqlite3-1.3.11
Installing ri documentation for sqlite3-1.3.11
Done installing documentation for sqlite3 after 1 seconds
1 gem installed
The SQLite library is likely to be corrupted. Try reinstalling the gem by running the following from a command pronpt:
gem uninstall sqlite3
Then run:
bundle install
I've rolled back ruby version to 2.3.0 and all worked .It seems to be an issue
#Jiggs: The same issue I got when my system updated to 16.04. After that all previous applications were difficult to configure as throwing so many dependency errors, in which your error was one of them.
After lots of finding only conclusion I got the problem is on RVM,
If you are using RVM then please install Rails 5.0 in yous default gemset
rvm gemset use default
gem install rails -v=5.0
After installing rails 5 all the compatible dependencies get installed.
Now move to your any project CREATE New GEMSET (please don't use previous).
rvm gemset create my_new_gemset
rvm gemset use my_new_gemset
Finally do bundle install
In my case after doing this resolved all the errors as you mentioned.
I know it is bit strange that installing Rails-5 in default gemset and using new gemset resolved this issue. But somehow it works.
Hope this will help you.
For me going back to ruby 2.2.5p319 helped. I just realize the version of the Ruby that comes with Rails has to match to the one installed even though the RubyInstaller release gets ahead.
I came here looking for answer, didn't help me, but I found a solution here, (it appears to be an issue with 1.3.11, downgrade to 1.3.10 did the trick)

Resources