Piet
Piet

Reputation: 63

json Errno::EPERM Operation not permitted

And, yes, another question of a similar type but non of the postings have helped my situation. Been trying to solve this one for two days.

When I type 'rails new app' or run 'bundle install' in an existing app, I get:

Errno::EPERM: Operation not permitted - /Users/pb/.rvm/gems/ruby-1.9.2-p290/gems/json-   1.6.5/.gitignore
An error occured while installing json (1.6.5), and Bundler cannot continue.
Make sure that `gem install json -v '1.6.5'` succeeds before bundling.

When I type any rails command in an existing project, I get:

Could not find json-1.6.5 in any of the sources
Run `bundle install` to install missing gems.

When I type sudo gem install json -v '1.6.5' I get:

Building native extensions.  This could take a while...
ERROR:  Error installing json:
  ERROR: Failed to build gem native extension.

/Users/pb/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb creating Makefile

make
/usr/bin/gcc-4.2 -I. -I/Users/pb/.rvm/rubies/ruby-1.9.2-p290/include/ruby
-1.9.1/x86_64-darwin10.8.0 -I/Users/pb/.rvm/rubies/ruby
-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/Users/pb/.rvm/rubies/ruby-1.9.2 p290/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SO
URCE   -fno-common -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long  -fno-common -pipe -O3 -Wall  -o parser.o -c parser.c
make: /usr/bin/gcc-4.2: No such file or directory
make: *** [parser.o] Error 1

I've tried all the following:

Uninstall gem json (this tells me json is not installed)
sudo gem update rails

I've also installed the latest xCode - 4.2.1.

Any advice as to solve my problem would be greatly appreciated!

Upvotes: 2

Views: 3573

Answers (2)

Gant Laborde
Gant Laborde

Reputation: 6774

Soooo, I just had the same problem with a much later version... turned out it was because I was in BYOBU. Exiting byobu and just working from the raw terminal fixed it... don't ask me how.

Upvotes: 2

fotanus
fotanus

Reputation: 20116

One possible reason for this happen is that you are using rails 3.2 and the application is rails 3.1.

execute bundle install and try to run it again.

Upvotes: 0

Related Questions