I am having a problem with pushing my rails project back up to heroku. I was able to do this a few days ago. I made a few changes to my files and tried to re push using git push heroku. It starts the process then gives me these errors.
> Counting objects: 56, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (35/35), done.
Writing objects: 100% (37/37), 3.96 KiB, done.
Total 37 (delta 18), reused 0 (delta 0)
`-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Detected Rails is not set to serve static_assets
Installing rails3_serve_static_assets... done
-----> Configure Rails 3 to disable x-sendfile
Installing rails3_disable_x_sendfile... done
-----> Configure Rails to log to stdout
Installing rails_log_stdout... done
-----> Gemfile detected, running Bundler version 1.0.7
Unresolved dependencies detected; Installing...
Using --without development:test
Fetching source index for https://rubygems.org/
Installing rake (0.9.2.2)
Installing ZenTest (4.7.0) /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/installer.rb:170:in `install': ZenTest requires RubyG
ems version ~> 1.8. Try 'gem update --system' to update RubyGems itself. (Gem::InstallError)
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/source.rb:95:in `install'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/installer.rb:55:in `block in run'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `block in each'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/installer.rb:44:in `run'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/installer.rb:8:in `install'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/cli.rb:225:in `install'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:in `run'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/base.rb:389:in `start'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/bin/bundle:13:in `<top (required)>'
from /usr/ruby1.9.2/bin/bundle:19:in `load'
from /usr/ruby1.9.2/bin/bundle:19:in `<main>'
FAILED: http://devcenter.heroku.com/articles/bundler
! Heroku push rejected, failed to install gems via Bundler
`To git#heroku.com:mbartonsampleapp.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:mbartonsampleapp.git'
My Gem fils has
source 'https://rubygems.org'
gem 'rails', '3.2.3'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'heroku'
group :development do
gem "ZenTest", "~> 4.7.0"
gem 'sqlite3'
gem 'autotest', '4.4.6'
gem 'rspec-rails', '2.9.0'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
group :production do
# gems specifically for Heroku go here
gem 'pg'
end
group :test do
gem 'autotest', '4.4.6'
gem 'rspec-rails', '2.9.0'
gem 'webrat', '0.7.3'
gem "spork", '0.9.0'
end
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', :platform => :ruby
gem 'execjs'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
Your Gemfile looks a bit messed up: the assets group isn’t closed (it’s missing an end), so your production and test groups are nested in it (there’s an extra end after gem 'uglifier' that eventually closes it).
This could be confusing Bundler, so that it doesn’t see ZenTest as being in the development group and tries to install it on Heroku.
Related
I have a very simple application that I am trying to push to Heroku and having issues. I don't have any special Gems installed and doing nothing special, but keep getting an error parsing my Gemfile.
I have seen examples adding Gem 'rails_12factor' defining Bundler version, Ruby version, updating bundler, updating system. The error doesn't change after doing any of these fixes. I installed with RailsInstaller recently, so I am running current versions of everything.
Here is my Gemfile:
source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
ruby '~> 2.3.3'
gem 'bundler', '~> 2.0.2'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1.7'
# Use Puma as the app server
gem 'puma', '~> 3.7'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use CoffeeScript for .coffee assets and viewrubys
gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', '11.0.1'
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
# Use sqlite3 as the database for Active Record
gem "sqlite3", "~> 1.3.6"
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console', '>= 3.3.0'
end
group :production do
gem 'pg'
gem 'rails_12factor'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
This the error I am gettting:
$ git push herokustaging master
Enumerating objects: 300, done.
Counting objects: 100% (300/300), done.
Delta compression using up to 8 threads
Compressing objects: 100% (275/275), done.
Writing objects: 100% (300/300), 59.91 KiB | 1.50 MiB/s, done.
Total 300 (delta 96), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: ! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
remote: Detected buildpacks: Ruby,Node.js
remote: See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote:
remote: !
remote: ! There was an error parsing your Gemfile, we cannot continue
remote: ! /app/tmp/buildpacks/b7af5642714be4eddaa5f35e2b4c36176b839b4abcd9bfe57ee71c358d71152b4fd2cf925c5b6e6816adee359c4f0f966b663a7f8649b0729509d510091abc07/vendor/ruby/heroku-18/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException)
remote: ! from /app/tmp/buildpacks/b7af5642714be4eddaa5f35e2b4c36176b839b4abcd9bfe57ee71c358d71152b4fd2cf925c5b6e6816adee359c4f0f966b663a7f8649b0729509d510091abc07/vendor/ruby/heroku-18/lib/ruby/2.5.0/rubygems.rb:308:in `activate_bin_path'
remote: ! from /tmp/d20190618-120-vf683l/bundler-2.0.1/bin/bundle:23:in `<main>'
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to sojournsb.
The relevant part of the error message appears to be
can't find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException)
You shouldn't need to install bundler on Heroku, and I'm not sure how helpful it is to have in your Gemfile even in development. If you don't have Bundler, how will you run bundle install in the first place?
Try taking bundler out of your Gemfile (and Gemfile.lock), then redeploy.
My problem was that I was using an older version of Ruby that was not compatible with Heroku. I installed the latest version of Ruby, and rebuilt my app. I was then able to push to Heroku successfully.
A pretty simple thing to catch really, but the error message wasn't totally helpful.
Anywho, thanks!
I am having an issue where images on my Heroku production site are not being found. I have tracked it down to the digest being different in the file system from what it is looking for in the app. For example, in the logs I see the following errors:
app[web.1]: Started GET "/assets/nfl_teams/nfcn/chi-6317d0375db3876a5057f2da59bab1dc.jpeg" for 24.55.52.101 at 2016-09-08 23:10:18 +0000
app[web.1]: ActionController::RoutingError (No route matches [GET] "/assets/nfl_teams/nfcn/chi-6317d0375db3876a5057f2da59bab1dc.jpeg"):
app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.5/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.5/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
app[web.1]: vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/rack/logger.rb:38:in `call_app'
And when I go to the Heroku console and look up the asset using asset_path() I get the following:
$ heroku run rails console
Running rails console on ⬢ fbpm... up, run.7463
Loading production environment (Rails 4.2.5)
irb(main):001:0> puts helper.asset_path("nfl_teams/nfcn/chi.jpg")
/assets/nfl_teams/nfcn/chi-93d8c8c53ac98c60f7f3fee1fade067dfa9489b24b8fa4bb9fedd4b12da129de.jpg
=> nil
irb(main):002:0>
and finally looking at the heroku bash and checking the file in the directory I get:
$ heroku run bash
Running bash on ⬢ fbpm... up, run.7321
cd public~ $ cd public/assets/nfl_teams/nfcn
~/public/assets/nfl_teams/nfcn $ ls chi*.jpg
chi-93d8c8c53ac98c60f7f3fee1fade067dfa9489b24b8fa4bb9fedd4b12da129de.jpg
~/public/assets/nfl_teams/nfcn $
So, in the console looking at the asset path I get the following file:
/assets/nfl_teams/nfcn/chi-93d8c8c53ac98c60f7f3fee1fade067dfa9489b24b8fa4bb9fedd4b12da129de.jpg
And I get the same file when I look in the directory structure. Yet for some reason the application is looking for this file:
/assets/nfl_teams/nfcn/chi-6317d0375db3876a5057f2da59bab1dc.jpeg
Which doesn't exist and throws a routing error.
Here is my Gemfile:
source 'https://rubygems.org'
ruby '2.2.4'
#ruby-gemset=Rails_fb
gem 'rails','4.2.5'
gem 'bcrypt', '3.1.11'
gem 'annotate'
gem 'faker', '1.6.3'
gem 'select2-rails'
gem 'simple_form', '3.1.1'
gem 'cocoon'
#
# Bootstrap support gems
#
gem 'bootstrap-sass'
gem 'bootstrap-will_paginate', '0.0.10'
gem 'font-awesome-sass', '4.6.2'
gem 'font-awesome-rails'
gem 'sass-rails', '~> 5.0.4'
#gem 'select2-sass-bootstrap-rails'
# The following Gem is used to parse the NFL page for schedules to build
# a season.
gem 'nokogiri'
# Database. Using the same database for production/development
gem 'pg'
group :development, :test do
gem 'rspec-rails', '~>3.0'
gem 'factory_girl_rails', '4.7.0'
gem 'capybara', '2.7.1'
gem 'database_cleaner'
gem 'guard-rspec', '~> 4.2'
gem 'spork-rails'
gem 'guard-spork'
gem 'childprocess', '0.5.8'
gem 'letter_opener_web', '~>1.2.0'
end
group :test do
gem 'pry'
gem 'selenium-webdriver', '2.53.0'
gem 'libnotify', '0.9.1'
end
gem 'uglifier', '2.7.2'
gem 'coffee-rails', '4.1.1'
gem 'jquery-rails', '3.1.4'
gem 'jquery-turbolinks', '2.1.0'
gem 'turbolinks', '2.5.3'
gem 'jbuilder', '2.4.1'
group :doc do
gem 'sdoc', '0.4.1', require: false
end
group :production do
gem 'rails_12factor'
end
# To use debugger
# gem 'debugger'
gem 'execjs'
gem 'therubyracer', :platforms => :ruby
And here is the code I'm using to access the images in my views(I've tried it both with and without the asset_path() call):
<%= image_tag(asset_path(team.imagePath), size: "40") %>
Can anyone tell me why the app is looking for the wrong file? Obviously there is some disconnect in the asset pipeline but I can't figure where?
And this problem started after I upgraded from Ruby 2.0.0 to Ruby 2.2.4 which caused me to update a number of my Gems.
Hopefully this helps. In order to force a new precompile of assets on Heroku in Rails 4 you need to do the following:
rake assets:clobber
Rake assets:precompile
Then git commit/push to master and push to Heroku and it should do a new precompile that hopefully will sync up the asset pipeline. Don't use rake assets:clean as it doesn't force a new compile.
I am trying to rake db:migrate. I cloned a repository and tried to rake db:migrate, but get this error :
rake aborted!
Unable to determine name from existing gemspec. Use :name => 'gemname' in #inst
ll_tasks to manually set it. C:/Users/Dila/Documents/emo_project/Rakefile:6:in `<top (required)>'
In my Rakefile line 6, I have this :
require "bundler/gem_tasks"
This is what I got, when I trace it :
C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/gem_helper.rb:30:i
n `initialize'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/gem_helper.rb:14:i
n `new'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/gem_helper.rb:14:i
n `install_tasks'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/gem_tasks.rb:2:in
`<top (required)>'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/depen
dencies.rb:251:in `require'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/depen
dencies.rb:251:in `block in require'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/depen
dencies.rb:236:in `load_dependency'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/depen
dencies.rb:251:in `require'
C:/Users/Dila/Documents/emo_project/Rakefile:6:in `<top (required)>'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `l
oad'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `l
oad_rakefile'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:589:in `
raw_load_rakefile'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:89:in `b
lock in load_rakefile'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `
standard_exception_handling'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:88:in `l
oad_rakefile'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:72:in `b
lock in run'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `
standard_exception_handling'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:70:in `r
un'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/bin/rake:33:in `<top (required)>
'
C:/Ruby193/bin/rake:23:in `load'
C:/Ruby193/bin/rake:23:in `<main>'
I have no idea what is went wrong, because yesterday I was working in my office and everything was ok. I just wanna try to clone the repository in my laptop, but it doesn't work.
my gemfile :
source 'https://rubygems.org'
if RUBY_VERSION =~ /1.9/
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8
end
group :production do
gem 'pg', '0.12.2'
end
gem 'magic_encoding'
gem 'rails', '3.2.2'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
gem 'activeadmin'
gem "bcrypt-ruby", :require => "bcrypt"
# to copy to clipboard
gem 'zeroclipboard-rails'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
#gem 'therubyracer'
gem 'uglifier', '>= 1.0.4'
gem 'sass-rails', '~> 3.2'
gem 'bootstrap-sass', '~> 2.3.1.0'
gem 'closure-compiler'
end
gem 'jquery-rails'
I see in your gemfile that you set postgresql as your production database, however you also set sqlite to run on production, test, and development.
group :production do
gem 'pg', '0.12.2'
end
# Skip some lines to here
gem 'sqlite3'
I would make sure your database is uniform across the test, development, and production servers. I would remove sqlite3 and simply have
group :production do
gem 'pg', '0.12.2'
end
replaced with
gem 'pg', '0.12.2'
That way, postgresql will run on all platforms. Or if your database.yml is connected to sqlite, then get rid of postgresql and keep the sqlite gem in your gemfile.
After my upgrade to Rails 3.1.3 and Ruby 1.9.3 (via RVM) i can't normally run autotest. I don't know what has happened, but when i print:
$ autotest
It shows strange error
loading autotest/rails_rspec2
/Users/serg/.rvm/rubies/ruby-1.9.3-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require': cannot load such file -- autotest/fsevent (LoadError)
from /Users/serg/.rvm/rubies/ruby-1.9.3-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /Users/serg/rails_projects_terminal/sample_app/.autotest:2:in `<top (required)>'
from /Users/serg/.rvm/gems/ruby-1.9.3-head#global/gems/ZenTest-4.6.2/lib/autotest.rb:315:in `load'
from /Users/serg/.rvm/gems/ruby-1.9.3-head#global/gems/ZenTest-4.6.2/lib/autotest.rb:315:in `block in initialize'
from /Users/serg/.rvm/gems/ruby-1.9.3-head#global/gems/ZenTest-4.6.2/lib/autotest.rb:314:in `each'
from /Users/serg/.rvm/gems/ruby-1.9.3-head#global/gems/ZenTest-4.6.2/lib/autotest.rb:314:in `initialize'
from /Users/serg/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.8.0/lib/autotest/rspec2.rb:13:in `initialize'
from /Users/serg/.rvm/gems/ruby-1.9.3-head/gems/rspec-rails-2.8.0/lib/autotest/rails_rspec2.rb:31:in `initialize'
from /Users/serg/.rvm/gems/ruby-1.9.3-head#global/gems/ZenTest-4.6.2/lib/autotest.rb:244:in `new'
from /Users/serg/.rvm/gems/ruby-1.9.3-head#global/gems/ZenTest-4.6.2/lib/autotest.rb:244:in `run'
from /Users/serg/.rvm/gems/ruby-1.9.3-head#global/gems/ZenTest-4.6.2/bin/autotest:6:in `<top (required)>'
from /Users/serg/.rvm/gems/ruby-1.9.3-head#global/bin/autotest:19:in `load'
from /Users/serg/.rvm/gems/ruby-1.9.3-head#global/bin/autotest:19:in `<main>'
But when i try:
bundle exec autotest
It works. How can i fix it?
My gemfile:
source 'http://rubygems.org'
gem 'rails', '3.1.3'
gem 'gravatar_image_tag'
gem 'will_paginate'
gem 'rack'
gem 'texticle', "2.0", :require => 'texticle/rails'
group :assets do
gem 'sass-rails'
gem 'coffee-rails'
gem 'uglifier'
end
gem 'jquery-rails'
group :development do
gem 'rspec-rails'
gem 'therubyracer-heroku'
gem 'pg'
gem 'annotate', :git => 'git://github.com/ctran/annotate_models.git'
gem 'faker'
end
group :test do
gem 'rspec-rails'
gem 'webrat'
gem 'spork'
gem 'autotest'
gem 'autotest-rails-pure'
gem 'autotest-fsevent'
gem 'autotest-growl'
gem 'factory_girl_rails'
end
group :production do
gem 'pg'
end
I had that issue as well, and to fix it I had to do what you did :
$ gem update ZenTest
$ gem cleanup ZenTest
$ gem install autotest-fsevent
But I also had to add 'autotest-growl' and 'autotest-fsevent' to my gemfile, which now looks like this:
group :development do
gem 'sqlite3'
gem 'rspec-rails'
gem 'autotest'
gem 'ZenTest'
gem 'autotest-growl'
gem 'autotest-fsevent'
end
Then
$ Bundle install
And now
$ autotest
works just fine :)
I solved it. I found this page: http://www.viget.com/extend/how-why-to-run-autotest-on-your-mac/
and then i printed in the Terminal:
$ gem update ZenTest
$ gem cleanup ZenTest
$ gem install autotest-fsevent
After that autotest started to work fine.
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.
It look like you are using the system's ruby. You have a few options:
use sudo to install your bundle system wide. it could be a problem with conflicting gems from different applications.
use bundle install --path bundle_dir, which is going to install the gems in bundle_dir
use rvm (http://rvm.beginrescueend.com), this program will allow you to use different ruby versions, and different gem sets.
Try to touch a file in the particular path. I guess OS X is protecting these directories a bit more than just the normal way? I think OS X supports ACL's with their filesystem, maybe you have to look there?
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...