0

I am currently finishing the 9th chapter of the Ruby on Rails Tutorial by Michael Hartl. The last step of this is to push the code to heroku ($ git push heroku) which is something that I have done many times before with no issues. This time however, the push runs until rake assets:precompile then aborts with the message "No such file or directory - /tmp/vendor."

Here's what I'm thinking... Since I am specifying the versions of all of my gemfiles (therefore must use bundle exec with rake commands). Perhaps one has since been updated and has consequently changed how things are done? I added three gems in this chapter: gem 'faker', '1.1.2' gem 'will_paginate', '3.0.4' gem 'bootstrap-will_paginate', '0.0.9'

I'd appreciate your help with this. Let me know if you'd like to see any other bits of code.

warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:

  git config --global push.default matching

To squelch this message and adopt the new behavior now, use:

  git config --global push.default simple

When push.default is set to 'matching', git will push local branches
to the remote branches that already exist with the same name.

In Git 2.0, Git will default to the more conservative 'simple'
behavior, which only pushes the current branch to the corresponding
remote branch that 'git pull' uses to update the current branch.

See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)

Fetching repository, done.
Counting objects: 82, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (50/50), done.
Writing objects: 100% (52/52), 8.22 KiB | 0 bytes/s, done.
Total 52 (delta 29), reused 0 (delta 0)

-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-1.9.3
###### WARNING:
       Removing `Gemfile.lock` because it was generated on Windows.
       Bundler will do a full resolve so native gems are handled properly.
       This may result in unexpected gem versions being used in your app.
       In rare occasions Bundler may not be able to resolve your dependencies at
 all.
       https://devcenter.heroku.com/articles/bundler-windows-gemfile

-----> Installing dependencies using 1.6.3
       Running: bundle install --without development:test --path vendor/bundle -
-binstubs vendor/bundle/bin -j4
       Fetching git://github.com/bmabey/database_cleaner.git
       Fetching gem metadata from https://rubygems.org/.........
       Resolving dependencies...
       Using i18n 0.6.11
       Using minitest 4.7.5
       Using rake 10.3.2
       Using multi_json 1.10.1
       Using thread_safe 0.3.4
       Using tzinfo 0.3.41
       Using builder 3.1.4
       Using erubis 2.7.0
       Using rack 1.5.2
       Using mime-types 1.25.1
       Using polyglot 0.3.5
       Using activerecord-deprecated_finders 1.0.3
       Using arel 4.0.2
       Using bcrypt-ruby 3.1.2
       Using bundler 1.6.3
       Installing will_paginate 3.0.4
       Using execjs 2.2.1
       Using thor 0.19.1
       Using hike 1.2.3
       Using json 1.8.1
       Using pg 0.15.1
       Using tilt 1.4.1
       Using rails_serve_static_assets 0.0.2
       Using rails_stdout_logging 0.0.3
       Installing coffee-script-source 1.8.0
       Using activesupport 4.0.8
       Using rack-test 0.6.2
       Using treetop 1.4.15
       Installing faker 1.1.2
       Using uglifier 2.1.1
       Using rdoc 3.12.2
       Using sprockets 2.11.0
       Using rails_12factor 0.0.2
       Using coffee-script 2.3.0
       Using activemodel 4.0.8
       Using jbuilder 1.0.2
       Using actionpack 4.0.8
       Using mail 2.5.4
       Using sdoc 0.3.20
       Using activerecord 4.0.8
       Using railties 4.0.8
       Using sprockets-rails 2.0.1
       Using actionmailer 4.0.8
       Using coffee-rails 4.0.1
       Using jquery-rails 3.0.4
       Using rails 4.0.8
       Using turbolinks 1.1.1
       Installing bootstrap-will_paginate 0.0.9
       Installing sass 3.4.2
       Using bootstrap-sass 2.3.2.0
       Using sass-rails 4.0.1
       Your bundle is complete!
       Gems in the groups development and test were not installed.
       It was installed into ./vendor/bundle
       Bundle completed (7.54s)
       Cleaning up the bundler cache.
       Removing coffee-script-source (1.7.1)
       Removing sass (3.4.1)
       Removing database_cleaner (78c14eb6add2)
-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       rake aborted!
       Errno::ENOENT: No such file or directory - /tmp/vendor
       (in /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/app/assets/stylesheet
s/custom.css.scss)
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sass-3.4.2/lib/sass/util.rb:670:in `realpath'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sass-3.4.2/lib/sass/util.rb:670:in `realpath'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sass-3.4.2/lib/sass/util.rb:670:in `realpath'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sass-3.4.2/lib/sass/importers/filesystem.rb:16:in `initialize'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sass-3.4.2/lib/sass/engine.rb:192:in `new'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sass-3.4.2/lib/sass/engine.rb:192:in `block in normalize_options'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sass-3.4.2/lib/sass/engine.rb:190:in `map'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sass-3.4.2/lib/sass/engine.rb:190:in `normalize_options'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sass-3.4.2/lib/sass/engine.rb:256:in `initialize'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/sass_template.rb:53:in `new'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/sass_template.rb:53:in `evaluate'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/context.rb:197:in `block in evaluate'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/context.rb:194:in `each'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/context.rb:194:in `evaluate'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/processed_asset.rb:12:in `initialize'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/base.rb:374:in `new'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/base.rb:374:in `block in build_asset'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/base.rb:395:in `circular_call_protection'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/base.rb:373:in `build_asset'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/index.rb:94:in `block in build_asset'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/caching.rb:58:in `cache_asset'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/index.rb:93:in `build_asset'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/base.rb:287:in `find_asset'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/index.rb:61:in `find_asset'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/processed_asset.rb:44:in `block in init_with
'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/processed_asset.rb:37:in `map'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/processed_asset.rb:37:in `init_with'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/asset.rb:24:in `from_hash'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/caching.rb:54:in `cache_asset'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/index.rb:93:in `build_asset'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/base.rb:287:in `find_asset'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/index.rb:61:in `find_asset'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/bundled_asset.rb:37:in `init_with'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/asset.rb:24:in `from_hash'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/caching.rb:54:in `cache_asset'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/index.rb:93:in `build_asset'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/base.rb:287:in `find_asset'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/index.rb:61:in `find_asset'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/manifest.rb:211:in `block in find_asset'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/manifest.rb:257:in `benchmark'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/manifest.rb:210:in `find_asset'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/manifest.rb:119:in `block in compile'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/manifest.rb:118:in `each'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/sprockets/manifest.rb:118:in `compile'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:60:in `block (3 levels) i
n define'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-2.11.0/lib/rake/sprocketstask.rb:146:in `with_logger'
       /tmp/build_7a742b79-a87b-4c76-a670-89b3b01f45eb/vendor/bundle/ruby/1.9.1/
gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:59:in `block (2 levels) i
n define'
       Tasks: TOP => assets:precompile
       (See full trace by running task with --trace)
 !
 !     Precompiling assets failed.
 !

 !     Push rejected, failed to compile Ruby app

To git@heroku.com:powerful-island-6522.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:powerful-island-6522.git'

And my gemfile...

source 'https://rubygems.org'
ruby '1.9.3'
#ruby-gemset=railstutorial_rails_4_0

gem 'rails', '4.0.8'
gem 'bootstrap-sass', '2.3.2.0'
gem 'sprockets', '2.11.0'
gem 'bcrypt-ruby', '3.1.2'
gem 'faker', '1.1.2'
gem 'will_paginate', '3.0.4'
gem 'bootstrap-will_paginate', '0.0.9'

group :development, :test do
  gem 'sqlite3', '1.3.8'
  gem 'rspec-rails', '2.13.1'
end

group :test do
  gem 'selenium-webdriver', '2.35.1'
  gem 'capybara', '2.1.0'
  gem 'factory_girl_rails', '4.2.0'
  gem 'cucumber-rails', '1.4.0', :require => false
  gem 'database_cleaner', github: 'bmabey/database_cleaner'
end

gem 'sass-rails', '4.0.1'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '3.0.4'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'

group :doc do
  gem 'sdoc', '0.3.20', require: false
end

group :production do
  gem 'pg', '0.15.1'
  gem 'rails_12factor', '0.0.2'
end
sbeckme
  • 9
  • 4

2 Answers2

0

i started running into the same issue today at the end of Chapter 10. I was able to push chapter 9 to heroku the other day so I do not think this issue is necessarily related to the gems installed in ch 9.

mikest34
  • 29
  • 1
  • I noticed i was also having the issue when attempting to compile the SASS files. I did solve that problem by creating a vendor/assets/stylesheets path one level up. It looks to me like it is some kind of path configuration issue. Please post an update if you figure out the solution. I moved on with the tutorial without Heroku for now. – mikest34 Sep 04 '14 at 02:40
0

I 'think' I determined the cause of this. Which is also the reason that I had trouble at the beginning of chapter 10 creating a Microposts model. So here it is.

I run Windows 7. To deal with the coloring issues of the windows cmd line during tests, I installed ANSI Console to run as my development terminal. As a default, ANSI console tells windows that it is now the default terminal (see here where I found this out) which also limits the ability of the standard windows cmd line. When I was running my git push command to heroku (as well as my rake db:migrate) I, by habit, re-opened the cmd line instead of ANSI console. While the cmd line appears to work, it actually no longer performs all tasks to their completion because it can no longer find certain directories.

To make a long story short, I switched to ANSI console again and everything worked.

The above link can show you how to remove the default in the event you want to switch back to the 'cmd' terminal.

Community
  • 1
  • 1
sbeckme
  • 9
  • 4