Reputation: 3
So I'm trying to use jobsworth and run into an issue with the schema not properly generating. I submitted a report, got a stock reply of "We fixed it for next release" (which they have been saying for over 5 months now) and a nice little workaround using rake. shame the rake command doesn't work.
So I run bundle install:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
checking for main() in -lc... yes
creating Makefile
make
sh: 1: make: not found
Gem files will remain installed in /var/lib/gems/1.9.1/gems/RedCloth-4.2.9 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/RedCloth-4.2.9/ext/redcloth_scan/gem_make.out
An error occurred while installing RedCloth (4.2.9), and Bundler cannot continue.
Make sure that `gem install RedCloth -v '4.2.9'` succeeds before bundling.
Fantastic. Then I try installing RedCloth:
ERROR: Error installing RedCloth:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
checking for main() in -lc... yes
creating Makefile
make
sh: 1: make: not found
Gem files will remain installed in /var/lib/gems/1.9.1/gems/RedCloth-4.2.9 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/RedCloth-4.2.9/ext/redcloth_scan/gem_make.out
I've looked around for many solutions and most are related to errors with Octopress or on Macs, and I'm not using either so they aren't very helpful.
Upvotes: 0
Views: 179
Reputation: 41
This command solved my problem:
sudo apt-get install build-essential
Upvotes: 0
Reputation: 2075
Same problem when deploying my project via Puppet.
In my case, even though make
is present and all related libraries are installed, $PATH
is set correctly for root
and other users, running bundle install
via exec
resource in Puppet (see below) resulted in this very same error:
class bundler_run ($target) {
exec { 'get bundle':
path => [ '/bin', '/usr/local/bin', '/var/lib/gems/1.9.1/bin' ],
cwd => $target,
unless => "bundle check > /dev/null",
command => 'bundle install --deployment --clean --without development test',
logoutput => true,
}
}
My fix for that, was setting PATH
explicitly in Gemfile
ENV['PATH'] = "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin"
Additionally, setting encoding to UTF8, solves ArgumentError: invalid byte sequence in US-ASCII
error,
if RUBY_VERSION =~ /1.9/
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8
end
Upvotes: 0
Reputation: 30310
The error is saying that make
is not installed. If it's not installed, install it. If it is installed, add the directory containing the make
binary to to $PATH
and try again.
Upvotes: 2