2

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?

Luís Ramalho
  • 10,018
  • 4
  • 52
  • 67
  • Is there anything interesting in the build log file (from the `Results logged to` line at the end of your paste)? I'm wondering if an earlier `mkdir` or something failed. Check which path elements exist; start with `/home/luisramalho/.rvm/gems/ruby-2.0.0-p0/gems/json-1.6.8/ext/json/ext/json` and work your way back and you might find some specific problem. Perhaps an existing file with the same name prevented one of the directories from being created. – Jim Stewart Apr 26 '13 at 13:07
  • Thank you @JimStewart, the log file basically shows the same as the console which is what I posted in my question. What I find strange is that the path is `json-1.6.8/ext/json/ext/json/ext`, and in my machine I just have `json-1.6.8/ext/json/ext`. Moreover, I don't have this problem when I use `ruby-1.9.3-p392 [ x86_64 ]` where I've managed to install caldecott without any issues. – Luís Ramalho Apr 26 '13 at 13:18
  • 1
    I'm close to the people who worked on caldecott. I don't think caldecott or caldecott-client were ever meant to be compatible with Ruby 2.0, FWIW. If it did work, it would be by luck, not because any of the developers specifically aimed for Ruby 2.0 compatibility. – Mark Rushakoff Apr 26 '13 at 14:22

1 Answers1

0

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
Ajibola
  • 1,218
  • 16
  • 28