views:

213

answers:

1

So, I'm positive I once did a 'sudo' bundle install' out of desperation, which I now understand is a no-no. But now, when i try to run 'bundle install', I get the following error:

Installing culerity (0.2.12) /Library/Ruby/Site/1.8/rubygems/installer.rb:294:in `generate_bin': You don't have write permissions into the /Library/Ruby/Gems/1.8/bin directory. (Gem::FilePermissionError)
    from /Library/Ruby/Site/1.8/rubygems/installer.rb:196:in `install'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.6/lib/bundler/source.rb:100:in `install'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.6/lib/bundler/installer.rb:55:in `run'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.6/lib/bundler/spec_set.rb:12:in `each'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.6/lib/bundler/spec_set.rb:12:in `each'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.6/lib/bundler/installer.rb:44:in `run'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.6/lib/bundler/installer.rb:8:in `install'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.6/lib/bundler/cli.rb:217:in `install'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.6/lib/bundler/vendor/thor/task.rb:22:in `send'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.6/lib/bundler/vendor/thor/task.rb:22:in `run'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.6/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.6/lib/bundler/vendor/thor.rb:246:in `dispatch'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.6/lib/bundler/vendor/thor/base.rb:389:in `start'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.6/bin/bundle:13
    from /usr/bin/bundle:19:in `load'
    from /usr/bin/bundle:19

I've tried removeing everything in ~/.bundle ~/.gem .bundle Gemfile.lock as well as any reference to culerity or capybara in /Library/Ruby (OSX 10.6). I also checked to make sure permissions were set correctly (not root) on all my files in this project. I also cleared the gem cache.

My Gemfile:

source 'http://rubygems.org'

gem 'rails', '3.0.0.rc2'

# Bundle edge Rails instead:
#gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'pg'

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
gem 'ruby-debug'

# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri', '1.4.1'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'

# Bundle gems for certain environments:
# gem 'rspec', :group => :test
# group :test do
#   gem 'webrat'
# end

gem 'haml', '3.0.15'
gem 'mogli', '0.0.13' #, :path => "~/Sites/mogli"
gem 'facebooker2', '0.0.4'
gem 'geokit'
gem 'acts_as_restful_list'
gem 'hoptoad_notifier'

group :development, :test do
  gem "rspec-rails", '2.0.0.beta.19'
  gem 'factory_girl_rails'
  gem 'capybara', '0.3.9'
  gem 'database_cleaner'
  gem 'cucumber-rails', '0.3.2'
  gem 'cucumber', '0.8.5'
  gem 'spork'
  gem 'launchy'    # So you can do Then show me the page
end

Also, I have rvm on my system, but I'm using the system ruby for this project.

Any ideas on what's causing the permission issue? Surely, I'm not stuck using 'sudo bundle install'.

Thanks.

A: 

maybe try using chmod on everything, but looks like you'll need to run it as sudo...not sure why that's not an option...

rogerdpack
This is a very bad suggestion. Going and chmodding all your system directories is a bad idea, there are reasons you need to use sudo to access them.
AboutRuby