I'm running Ubuntu with ruby:
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
got Sass 3.4.9 installed and now I'm trying to install Compass from http://compass-style.org/install/ but when running gem install compass am getting errors:
Building native extensions. This could take a while...
ERROR: Error installing compass:
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:4:in `<main>'
Gem files will remain installed in /var/lib/gems/1.9.1/gems/ffi-1.9.6 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/ffi-1.9.6/ext/ffi_c/gem_make.out
this is the log file content:
/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:4:in `<main>'
I've been googling for hours and am still stuck. How to solve it?
There is a issue.
You can see more info here:
https://github.com/sass/sass/pull/1527 > https://github.com/guard/listen/issues/275
Related
2: from apk-embed-payload.rb:9:in `<main>'
1: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- colorize (LoadError)
It looks to me like you have a require 'colorize' in your code, but the gem colorize is not installed. You can install the gem by running:
gem install colorize
I assume you have gem installed. Otherwise you need to install it as well.
When I want to change content of the web page, I go to my local project directory and I run two commands:
jekyll build
jekyll serve
After that, my web app is running locally on my machine. When I tried to run the above commands today, I got stuck on the first of them, because the following error appeared:
$ jekyll build
Traceback (most recent call last):
5: from /usr/local/bin/jekyll:8:in `<main>'
4: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:92:in `require'
3: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:92:in `require'
2: from /Users/JaroslavBezdek/.gem/ruby/2.3.0/gems/jekyll-3.8.5/lib/jekyll.rb:34:in `<top (required)>'
1: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:92:in `require'
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- safe_yaml/load (LoadError)
I started to look it up on the internet and found I should try to install the missing library. However, it didn't solve the problem, because the other error showed up:
$ gem install safe_yaml
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
$ sudo gem install safe_yaml
Password:
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/bin directory.
My environment could be described as following:
$ ruby --version
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
$ gem --version
3.1.1
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.15.1
BuildVersion: 19B88
Please, could you help me, how to solve the problem?
I tried running a gitproject , https://github.com/jmopr/job-hunter
in RubyMine IDE. And while running the project from menu in RubyMine IDE, the error produced is this.
--------------------------(START)-Output for run of project------------
/usr/bin/ruby /Applications/software/projects/gitprojects/job-hunter_rb/bin/rails server -b 0.0.0.0 -p 3000 -e development
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- bundler (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:inrequire'
from /Applications/software/projects/gitprojects/job-hunter_rb/bin/spring:8:in <top (required)>'
from /Applications/software/projects/gitprojects/job-hunter_rb/bin/rails:3:inload'
from /Applications/software/projects/gitprojects/job-hunter_rb/bin/rails:3:in `'
Process finished with exit code 1
--------------------------(END)-Output for run of project------------
Specs:
Ruby Version (ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin16] )
rails -v
Could not find proper version of railties (4.2.5.1) in any of the sources
Run bundle install to install missing gems.
Its seems you are missing the bundler gem which is the gem responsible for installing all other gems.
1) Install bundler first gem install bundler
2) Use bundler to install the other gems, so from the root directory of the project, run bundle install
Hopefully that should sort it out
I am running ubuntu 14.04.3 LTS on an Amazon EC2 instance. Any help resolving this error would be much appreciated.
Typing sudo gem install mongo yields the following:
Fetching: bson-3.2.1.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing mongo:
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/bson-3.2.1 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/bson-3.2.1/ext/bson/gem_make.out
Another question - `require': no such file to load -- mkmf (LoadError) - has an answer which should fix the problem for you;
sudo apt-get install ruby1.9.1-dev
sudo apt-get install ruby-dev
Trying to install em-irc, got that:
/usr/bin/ruby1.9.1 extconf.rb
/usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:2:in `<main>'
Try running as root: sudo gem install em-irc