Ruby: 2.6.2
Rails: 6.0.3.4
I'm trying to run rails server and I keep getting this error:
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
My gemfile reads:
gem 'sqlite3', git: "https://github.com/sparklemotion/sqlite3-ruby"
I've tried installing sqlite3 to windows manually and tried chaning my gemfile to download version 1.3.11 with no luck.
Related
I require the json ruby gem to test some JSON files in Rspec. I use bundler to manage my gems, with my Gemfile looking as such:
source 'https://rubygems.org'
gem 'rake'
gem 'rspec'
gem 'json', '1.8.2'
However when I run bundle install everything passes but the json gem. Of which I get the following error message:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in 'require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in 'require'
from extconf.rb:1:in `<main>'
Gem files will remain installed in /var/lib/gems/1.9.1/gems/json-1.8.2 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/json-1.8.2/ext/json/ext/generator/gem_make.out
An error occurred while installing json (1.8.2), and Bundler cannot continue.
Make sure that 'gem install json -v '1.8.2'` succeeds before bundling.
I've already looked around and seen this suggestion:
sudo apt-get install libgmp3-dev
I've done this but the error is still present. The gem version I'm trying to install is 1.8.2, my ruby version is ruby 1.9.3p484 as this is the last stable release for Ubuntu 14.04 as far as I'm aware
If anyone could help resolve this I'd be very grateful
Getting this error when update/install gem Aptana radrails
ruby~$ ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [i686-linux]
rails -v
Rails 5.0.0
Welcome to the Rails Shell. This view is meant for advanced users and
command line lovers as a text-based way to run rails commands such as:
rails, script/generate, script/plugin, gem, rake, etc. This shell can
replace the functionality of the Rake Tasks, Rails Plugins, and
generators views.
gem install -l mongrel-1.1.5.gem ERROR: While executing gem ... (Gem::DependencyError)
Unable to resolve dependencies: mongrel requires daemons (>= 1.0.3)
gem install -l sqlite3-ruby-1.2.1.gem Building native extensions. This could take a while... ERROR: Error installing
sqlite3-ruby-1.2.1.gem: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot
load such file -- mkmf (LoadError) from
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' from
extconf.rb:1:in'
Gem files will remain installed in
/var/lib/gems/1.9.1/gems/sqlite3-ruby-1.2.1 for inspection. Results
logged to
/var/lib/gems/1.9.1/gems/sqlite3-ruby-1.2.1/ext/sqlite3_api/gem_make.out
gem install -l linecache-0.43.gem Building native extensions. This could take a while... ERROR: Error installing linecache-0.43.gem:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot
load such file -- mkmf (LoadError) from
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' from
extconf.rb:1:in'
Gem files will remain installed in
/var/lib/gems/1.9.1/gems/linecache-0.43 for inspection. Results logged
to /var/lib/gems/1.9.1/gems/linecache-0.43/ext/gem_make.out
gem install -l ruby-debug-base-0.10.3.gem ERROR: While executing gem ... (Gem::DependencyError)
Unable to resolve dependencies: ruby-debug-base requires linecache (>= 0.3)
gem install -l ruby-debug-ide-0.4.5.gem ERROR: While executing gem ... (Gem::DependencyError)
Unable to resolve dependencies: ruby-debug-ide requires ruby-debug-base (~> 0.10.3.0)
Currently on my system i have installed rbenv and rvm both. when i do which ruby it gave me this /home/ijunaidfarooq/.rbenv/shims/ruby and on which rails it gave me /home/ijunaidfarooq/.rbenv/shims/rails.
but on doing gem install bundler it installs the gem but with an error
Error loading RubyGems plugin "/home/ijunaidfarooq/.rvm/gems/ruby-2.2.2#global/gems/executable-hooks-1.3.2/lib/rubygems_plugin.rb": cannot load such file -- executable-hooks/wrapper (LoadError)
Error loading RubyGems plugin "/home/ijunaidfarooq/.rvm/gems/ruby-2.2.2#global/gems/gem-wrappers-1.2.7/lib/rubygems_plugin.rb": cannot load such file -- gem-wrappers (LoadError)
as its showing that its going for .rvm/gems as per which ruby and which rails , its going in .rbenv/shims
even on doing gem -v its giving me this
Error loading RubyGems plugin "/home/ijunaidfarooq/.rvm/gems/ruby-2.2.2#global/gems/executable-hooks-1.3.2/lib/rubygems_plugin.rb": cannot load such file -- executable-hooks/wrapper (LoadError)
Error loading RubyGems plugin "/home/ijunaidfarooq/.rvm/gems/ruby-2.2.2#global/gems/gem-wrappers-1.2.7/lib/rubygems_plugin.rb": cannot load such file -- gem-wrappers (LoadError)
2.4.5
application is working totally fine on localhost but when i update some gems and deploy on awselasticbeanstalk , it gives me error which is
cannot load such file -- bundler/setup
any help will be appreciated.
Using rbenv, runnng bundle install, and getting an error installing Json 1.8.1.
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:1:in `<main>'
Tried installing ruby-dev via apt (not sure that will help anyway, as ruby was installed via rbenv)
stuff that may help?
$ which gem
/home/ubuntu/.rbenv/shims/gem
$ which ruby
/home/ubuntu/.rbenv/shims/ruby
$ locate mkmf
/home/ubuntu/.rbenv/versions/1.9.3-p484/lib/ruby/1.9.1/mkmf.rb
/home/ubuntu/.rbenv/versions/1.9.3-p484/share/ri/1.9.1/system/Object/mkmf-i.ri
/usr/local/rvm/gems/ruby-2.2.1/extensions/x86_64-linux/2.2.0/nokogiri-1.6.6.2/mkmf.log
/usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/mkmf.rb
Based on your locate command, you have mkmf in rvm and in ubuntu's home diretory, but not on the system, and you're explicitly using the system's ruby (and not rbenv or rvm) to run the extconf.rb. Either run a ruby from one of the environments you have mkmf in, or install the ruby-dev package on the system.
I am attempting to install the CarrierWave gem for my Ruby on Rails application. When I go to the command prompt and type sudo gem install carrierwave I get the following error:
Building native extensions. This could take a while...
ERROR: Error installing carrierwave:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:13:in `<main>'
Gem files will remain installed in /var/lib/gems/1.9.1/gems/atomic-1.1.13 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/atomic-1.1.13/ext/gem_make.out
What on earth does this mean and how do I fix it?
Thanks, any help appreciated.
Lots of advice here: `require': no such file to load -- mkmf (LoadError)
It general, it sounds like you probably need to install some build tools.