Error installing caldecott on Ubuntu - ruby

In Ubuntu 12.10 when I run the following command
gem install caldecott
I get the following error message
Building native extensions. This could take a while...
ERROR: Error installing caldecott:
ERROR: Failed to build gem native extension.
/home/luisramalho/.rvm/rubies/ruby-2.0.0-p0/bin/ruby extconf.rb
creating Makefile
make
compiling generator.c
generator.c: In function ‘cState_aref’:
generator.c:632:5: warning: variable ‘state’ set but not used [-Wunused-but-set-variable]
generator.c: In function ‘isArrayOrObject’:
generator.c:867:5: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
linking shared-object json/ext/generator.so
make install
/usr/bin/install -c -m 0755 generator.so /home/luisramalho/.rvm/gems/ruby-2.0.0-p0/gems/json-1.6.8/ext/json/ext/json/ext
/usr/bin/install: cannot create regular file `/home/luisramalho/.rvm/gems/ruby-2.0.0-p0/gems/json-1.6.8/ext/json/ext/json/ext': No such file or directory
make: *** [install-so] Error 1
Gem files will remain installed in /home/luisramalho/.rvm/gems/ruby-2.0.0-p0/gems/json-1.6.8 for inspection.
Results logged to /home/luisramalho/.rvm/gems/ruby-2.0.0-p0/gems/json-1.6.8/ext/json/ext/generator/gem_make.out
Anyone has any idea what might be causing this?

Just to make it easier for the next person here is the soln from user comment here (https://github.com/appfog/af/issues/27#issuecomment-19190069) :
$ rvm install ruby-1.9.3-p484
$ rvm use 1.9.3
$ gem install af
[...]
$ gem install caldecott
[... long list of dependencies being installed which didn't happen for Ruby 2.0]
$ af login
$ af tunnel

Related

Cannot install gem file

I've been on this for a few hrs already googled everything. Tried tons of answers, im using ruby x64 and devkit x64 (originaly isntalled the incorect one x32 but i just deleted it and installed the correct one x64)
Cant install json or (my actual target) ruby-debug-ide -v 0.4.32
gem version = 2.4.7
ruby version =ruby 2.4.2p198 (2017-09-14 revision 59899) [x64-mingw32]
C:\WINDOWS\system32>gem install json
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
C:/Ruby24-x64/bin/ruby.exe -r ./siteconf20171013-12212-1y42085.rb extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
generating generator-x64-mingw32.def
compiling generator.c
linking shared-object json/ext/generator.so
c:/ruby24-x64/programing/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgmp
collect2.exe: error: ld returned 1 exit status
make: *** [generator.so] Error 1
make failed, exit code 2
Gem files will remain installed in C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.1.0 for inspection.
Results logged to C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/json-2.1.0/gem_make.out
You might want to try a cloud9 editor, and per this tutorial https://www.railstutorial.org/book/beginning
It will save you quite a bit of pain setting up your rails environment.

gem install json issue with Mac OS X 10.11

I'm trying to install Ruby/JSON on Mac OS X 10.11.
However, the gem install command gives the error message:
smcho#macho ruby-rails-sample> gem install json
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
/Users/smcho/.rvm/rubies/ruby-2.2.1/bin/ruby -r ./siteconf20151025-39148-au2m2x.rb extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling generator.c
linking shared-object json/ext/generator.bundle
ld: warning: directory not found for option '-L/Users/haven/.sm/pkg/active/lib'
make "DESTDIR=" install
./install -m 0755 generator.bundle ./.gem.20151025-39148-i7g03f/json/ext
make: ./install: No such file or directory
make: *** [install-so] Error 1
make install failed, exit code 2
Gem files will remain installed in /Users/smcho/.rvm/gems/ruby-2.2.1/gems/json-1.8.3 for inspection.
Results logged to /Users/smcho/.rvm/gems/ruby-2.2.1/extensions/x86_64-darwin-14/2.2.0-static/json-1.8.3/gem_make.out
The message says make: ./install: No such file or directory, but I'm not sure how to fix this issue.
Is this a known issue, or is there a way to bypass this one?
This is my system version. I executed gem update --system to get the latest version.
> ruby -v
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin14]
> gem -v
2.4.8
I should have used the latest ruby (2.2.3) not the old one (2.2.1)
ruby-rails-sample> rvm --default use 2.2.3
Using /Users/smcho/.rvm/gems/ruby-2.2.3
smcho#macho ruby-rails-sample> gem install json
Building native extensions. This could take a while...
Successfully installed json-1.8.3
Parsing documentation for json-1.8.3
Installing ri documentation for json-1.8.3
Done installing documentation for json after 1 seconds
1 gem installed

Trying to install jekyll, getting the following error: Failed to build gem native extension

I'm trying to install Jekyll but I keep getting stuck on this error. Here's the output to my attempt at installing it
clinch#clinch-VirtualBox:~$ gem install jekyllBuilding native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
/home/clinch/.rvm/rubies/ruby-1.9.3-p392/bin/ruby extconf.rb
creating Makefile
make
compiling porter.c
cc1: unrecognized option `-Wextra'
cc1: unrecognized option `-Wno-missing-field-initializers'
cc1: unrecognized option `-Wdeclaration-after-statement'
make: *** [porter.o] Error 1
Gem files will remain installed in /home/clinch/.rvm/gems/ruby-1.9.3-p392/gems/fast-stemmer-1.0.2 for inspection.
Results logged to /home/clinch/.rvm/gems/ruby-1.9.3-p392/gems/fast-stemmer-1.0.2/ext/gem_make.out
clinch#clinch-VirtualBox:~$ gcc -v
Using built-in specs.
Configured with: ./configure --target=mips-dec-ultrix42 --program-prefix=mips- --with-gnu-as --with-gnu-ld --enable-obsolete
Thread model: single
gcc version 3.2.2
clinch#clinch-VirtualBox:~$ ruby -v
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]
clinch#clinch-VirtualBox:~$ uname -a
Linux clinch-VirtualBox 3.2.0-37-generic #58-Ubuntu SMP Thu Jan 24 15:28:10 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
I've installed the ruby1.9.1-dev package already. I've tried compiling with gcc 4.6 as opposed to 3.2.2 showed in the output I pasted. I also don't know if the native extension error is making the gcc die. I've also rebuilt ruby from scratch.
Maybe I should try with another Ruby version? Though I know 1.9.3 is supported by jekyll.
Any help will be appreciated.
Try installing Jekyll from Ruby or Ruby and Rails command prompt instead of any other command prompt
I am not an expert at all, so my suggested solution is just a 'guess' based on my experience below.
I am using Windows 7. Although you're using Ubuntu and not Windows 7, this solution might work for pretty much anyone with the same problem.
First, I installed Ruby from RailsInstaller. Then, I wanted to install Jekyll. I tried installing Jekyll from Cygwin. However, I received the following error (although it is not identical to the questioner's error, I think it is sufficiently similar):
$ gem install jekyll
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
/usr/bin/ruby.exe extconf.rb
creating Makefile
make
gcc -I. -I/usr/include/ruby-1.9.1/x86_64-cygwin -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -ggdb -O2 -pipe -fno-strict-aliasing -Wall -o posix-spawn.o -c posix-spawn.c
posix-spawn.c:9:19: fatal error: spawn.h: No such file or directory
#include <spawn.h>
^
compilation terminated.
Makefile:206: recipe for target `posix-spawn.o' failed
make: *** [posix-spawn.o] Error 1
Gem files will remain installed in /usr/lib/ruby/gems/1.9.1/gems/posix-spawn-0.3.6 for inspection.
Results logged to /usr/lib/ruby/gems/1.9.1/gems/posix-spawn-0.3.6/ext/gem_make.out
However, when I tried to install Jekyll from Command Prompt with Ruby and Rails (i.e. Ruby command prompt), Jekyll installed successfully.
Just in case this matters, I removed the system variable {Variable:Comspec,Value:C:\Windows\system32\cmd.exe} before (successfully) trying to install Jekyll from the Ruby and Rails command prompt.

Error: Installing vagrant gem in ruby 2.0.0

When I tried to install vagrant gem in ruby 2.0.0-p0, I am getting follwoing error:
~ ruby -v
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux]
~ gem -v
2.0.0.rc.2
~ gem list json
*** LOCAL GEMS ***
json (1.7.7)
~ gem install vagrant
Building native extensions. This could take a while...
ERROR: Error installing vagrant:
ERROR: Failed to build gem native extension.
/home/user_name/.rvm/rubies/ruby-2.0.0-p0/bin/ruby extconf.rb
checking for ruby/re.h... yes
checking for ruby/encoding.h... yes
creating Makefile
make
compiling generator.c
generator.c: In function ‘cState_aref’:
generator.c:736:5: warning: variable ‘state’ set but not used [-Wunused-but-set-variable]
linking shared-object json/ext/generator.so
make install
/usr/bin/install -c -m 0755 generator.so /home/user_name/.rvm/gems/ruby-2.0.0-p0/gems/json-1.5.5/ext/json/ext/json/ext
/usr/bin/install: cannot create regular file `/home/user_name/.rvm/gems/ruby-2.0.0-p0/gems/json-1.5.5/ext/json/ext/json/ext': No such file or directory
make: *** [install-so] Error 1
Gem files will remain installed in /home/user_name/.rvm/gems/ruby-2.0.0-p0/gems/json-1.5.5 for inspection.
Results logged to /home/user_name/.rvm/gems/ruby-2.0.0-p0/gems/json-1.5.5/ext/json/ext/generator/gem_make.out
I figure, its using json-1.5.5 from /home/user_name/.rvm/gems/ruby-2.0.0-p0/gems/ while building the gem and getting the above error.
I tried re-installing the latest json-1.7.7 gem and still it fails to install.
Update your rubygems with: gem update --system
Here is the commit that fixed this issue: https://github.com/rubygems/rubygems/commit/1ca11d00833bbca33215ff581303d1fee8f2d1ef

error installing waitr in ubuntu 11.10

ruby ubuntu rubygems wati automation testing tool watir in the newest version of Ubuntu.
I did a sudo apt-get install ruby to get the latest version of ruby, then I installed Rubygems and tried installing watir, but i'm getting this error.
It's using Ruby 1.8.7
I've also tried removing ruby and ruby gems and reinstalling but the error message still happens.
Can anyone tell me whats wrong?
root#kelley-VirtualBox:/home/kelley# gem -v
bash: /usr/bin/gem: No such file or directory
root#kelley-VirtualBox:/home/kelley# sudo apt-get install rubygems
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libtcltk-ruby1.8
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
rubygems
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 0 B/425 kB of archives.
After this operation, 4,166 kB of additional disk space will be used.
Selecting previously deselected package rubygems.
(Reading database ... 157806 files and directories currently installed.)
Unpacking rubygems (from .../rubygems_1.7.2-1_all.deb) ...
Processing triggers for man-db ...
Setting up rubygems (1.7.2-1) ...
root#kelley-VirtualBox:/home/kelley# gem list
*** LOCAL GEMS ***
root#kelley-VirtualBox:/home/kelley# gem install watir
Building native extensions. This could take a while...
ERROR: Error installing watir:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
checking for strncpy_s()... no
creating Makefile
make
gcc -I. -I. -I/usr/lib/ruby/1.8/i686-linux -I. -D_FILE_OFFSET_BITS=64 -fPIC -fno-strict-aliasing -g -g -O2 -fPIC -c win32/api.c
win32/api.c:2:21: fatal error: windows.h: No such file or directory
compilation terminated.
make: *** [api.o] Error 1
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/win32-api-1.4.8 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/win32-api-1.4.8/ext/gem_make.out
root#kelley-VirtualBox:/home/kelley#
Look at the Ubuntu documentation. There's a comprehensive, step-by-step guide that you can follow.
It seems like waitr is Windows-only. Try sudo gem install watir-webdriver

Resources