I'm using Mina to deploy a Rail application to a VPS (digital ocean).
When I use mina deploy I keep getting the same error:
rake aborted!
LoadError: cannot load such file -- nokogiri
C:\Sites\app>mina deploy --trace
** Invoke deploy (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke rvm:use (first_time)
** Execute rvm:use
** Execute deploy
** Invoke git:clone (first_time)
** Execute git:clone
** Invoke deploy:link_shared_paths (first_time)
** Execute deploy:link_shared_paths
** Invoke bundle:install (first_time)
** Execute bundle:install
** Invoke rails:db_migrate (first_time)
** Execute rails:db_migrate
** Invoke rails:assets_precompile (first_time)
** Execute rails:assets_precompile
** Invoke deploy:cleanup (first_time)
** Execute deploy:cleanup
user#45.45.45.45's password:
-----> Using RVM environment 'ruby-2.2.1#default'
$ rvm use "ruby-2.2.1#default" --create
Using /usr/local/rvm/gems/ruby-2.2.1
-----> Creating a temporary build path
$ touch "deploy.lock"
$ mkdir -p "./tmp/build-%s2267"
$ cd "./tmp/build-%s2267"
-----> Fetching new git commits
$ (cd "/home/user/app/scm" && git fetch "git#bitbucket.org:user/app.git" "master:master" --force)
Enter passphrase for key '/home/user/.ssh/id_rsa':
-----> Using git branch 'master'
$ git clone "/home/user/app/scm" . --recursive --branch "master"
Cloning into '.'...
done.
-----> Using this git commit
$ git --no-pager log --format='%%%%aN (%%%%h):%%%%n> %%%%s' -n 1 %aN (%h):%n> %s
$ rm -rf .git
-----> Symlinking shared paths
$ mkdir -p "./config"
$ mkdir -p "."
$ rm -rf "./config/database.yml"
$ ln -s "/home/user/app/shared/config/database.yml" "./config/database.yml"
$ rm -rf "./log"
$ ln -s "/home/user/app/shared/log" "./log"de
-----> Installing gem dependencies using Bundler
$ mkdir -p "/home/user/app/shared/bundle"
$ mkdir -p "./vendor"
$ ln -s "/home/user/app/shared/bundle" "./vendor/bundle"
$ bundle install --without development:test --path "./vendor/bundle" --deployment
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Using rake 10.4.2
Using i18n 0.7.0
Using json 1.8.2
Using minitest 5.6.1
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.2.0
Using builder 3.2.2
Using erubis 2.7.0
Using rails-deprecated_sanitizer 1.0.3
Using rails-dom-testing 1.0.6
Using loofah 2.0.2
Using rails-html-sanitizer 1.0.2
Using actionview 4.2.0
Using rack 1.6.1
Using rack-test 0.6.3
Using actionpack 4.2.0
Using globalid 0.3.5
Using activejob 4.2.0
Using mime-types 2.5
Using mail 2.6.3
Using actionmailer 4.2.0
Using activemerchant 1.47.0
Using activemodel 4.2.0
Using arel 6.0.0
Using activerecord 4.2.0
Using acts_as_list 0.7.2
Using addressable 2.3.8
Using execjs 2.5.2
Using autoprefixer-rails 5.1.11
Using awesome_nested_set 3.0.2
Using sass 3.4.13
Using bootstrap-sass 3.3.4.1
Using camertron-eprun 1.1.0
Using cancancan 1.10.1
Using bundler 1.8.4
Using thor 0.19.1
Using railties 4.2.0
Using sprockets 3.0.3
Using sprockets-rails 2.3.0
Using rails 4.2.0
Using canonical-rails 0.0.9
Using carmen 1.0.2
Using cldr-plurals-runtime-rb 1.0.0
Using climate_control 0.0.3
Using cocaine 0.5.7
Using coffee-script-source 1.8.0
Using coffee-script 2.4.1
Using coffee-rails 4.1.0
Using colorize 0.7.7
Using css_parser 1.3.6
Using daemons 1.2.2
Using polyglot 0.3.5
Using deface 1.0.1
Using orm_adapter 0.5.0
Using responders 2.1.0
Using warden 1.2.3
Using devise 3.4.1
Using devise-encryptable 0.1.2
Using eventmachine 1.0.7
Using ffaker 1.32.1
Using font-awesome-rails 4.3.0.0
Using friendly_id 5.1.0
Using friendly_id-globalize 1.0.0.alpha1
Using globalize 5.0.1
Using highline 1.6.21
Using htmlentities 4.3.3
Using multi_xml 0.5.5
Using httparty 0.13.3
Using i18n_data 0.5.1
Using multi_json 1.11.0
Using jbuilder 2.2.13
Using jquery-rails 4.0.3
Using jquery-ui-rails 5.0.3
Using kaminari 0.16.3
Using kaminari-i18n 0.3.2
Using khipu 1.3.5
Using open4 1.3.4
Using mina 0.3.4
Using money 6.5.1
Using monetize 1.3.0
Using paperclip 4.2.1
Using paranoia 2.1.2
Using polyamorous 1.2.0
Using premailer 1.8.4
Using premailer-rails 1.8.1
Using rabl 0.9.4.pre1
Using rails-i18n 4.0.4
Using ransack 1.4.1
Using rdoc 4.2.0
Using tilt 1.4.1
Using sass-rails 5.0.3
Using sdoc 0.4.1
Using select2-rails 3.5.9.1
Using state_machines 0.2.2
Using state_machines-activemodel 0.1.2
Using state_machines-activerecord 0.2.0
Using stringex 2.5.2
Using truncate_html 0.9.2
Using twitter_cldr 3.1.2
Using spree_core 3.0.2.beta from git://github.com/spree/spree.git (at 3-0-stable
)
Using versioncake 2.3.1
Using spree_api 3.0.2.beta from git://github.com/spree/spree.git (at 3-0-stable)
Using spree_backend 3.0.2.beta from git://github.com/spree/spree.git (at 3-0-sta
ble)
Using spree_cmd 3.0.2.beta from git://github.com/spree/spree.git (at 3-0-stable)
Using spree_frontend 3.0.2.beta from git://github.com/spree/spree.git (at 3-0-st
able)
Using spree_sample 3.0.2.beta from git://github.com/spree/spree.git (at 3-0-stab
le)
Using spree 3.0.2.beta from git://github.com/spree/spree.git (at 3-0-stable)
Using spree_auth_devise 3.0.0 from git://github.com/spree/spree_auth_devise.git
(at 3-0-stable)
Using spree_gateway 3.0.0.beta from git://github.com/spree/spree_gateway.git (at
3-0-stable)
Using spree_i18n 3.0.0 from git://github.com/spree/spree_i18n.git (at 3-0-stable
)
Using spree_slider 1.2.0 from git://github.com/spree-contrib/spree_slider.git (a
t master)
Using spree_static_content 2.3.0 from git://github.com/spree-contrib/spree_stati
c_content.git (at 3-0-stable)
Using thin 1.6.3
Using turbolinks 2.5.3
Using uglifier 2.7.1
Bundle complete! 25 Gemfile dependencies, 116 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into ./vendor/bundle.
-----> Migrating database
$ RAILS_ENV="production" bundle exec rake db:migrate
rake aborted!
LoadError: cannot load such file -- nokogiri
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/loofah-2.0.2/l
ib/loofah.rb:3:in `require'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/loofah-2.0.2/l
ib/loofah.rb:3:in `<top (required)>'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/rails-html-san
itizer-1.0.2/lib/rails-html-sanitizer.rb:2:in `require'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/rails-html-san
itizer-1.0.2/lib/rails-html-sanitizer.rb:2:in `<top (required)>'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/actionview-4.2
.0/lib/action_view/helpers/sanitize_helper.rb:3:in `require'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/actionview-4.2
.0/lib/action_view/helpers/sanitize_helper.rb:3:in `<top (required)>'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/actionview-4.2
.0/lib/action_view/helpers/text_helper.rb:32:in `<module:TextHelper>'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/actionview-4.2
.0/lib/action_view/helpers/text_helper.rb:29:in `<module:Helpers>'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/actionview-4.2
.0/lib/action_view/helpers/text_helper.rb:6:in `<module:ActionView>'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/actionview-4.2
.0/lib/action_view/helpers/text_helper.rb:4:in `<top (required)>'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/actionview-4.2
.0/lib/action_view/helpers/form_tag_helper.rb:18:in `<module:FormTagHelper>'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/actionview-4.2
.0/lib/action_view/helpers/form_tag_helper.rb:14:in `<module:Helpers>'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/actionview-4.2
.0/lib/action_view/helpers/form_tag_helper.rb:8:in `<module:ActionView>'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/actionview-4.2
.0/lib/action_view/helpers/form_tag_helper.rb:6:in `<top (required)>'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/actionview-4.2
.0/lib/action_view/helpers/form_helper.rb:4:in `require'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/actionview-4.2
.0/lib/action_view/helpers/form_helper.rb:4:in `<top (required)>'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/actionview-4.2
.0/lib/action_view/helpers.rb:50:in `<module:Helpers>'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/actionview-4.2
.0/lib/action_view/helpers.rb:4:in `<module:ActionView>'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/actionview-4.2
.0/lib/action_view/helpers.rb:3:in `<top (required)>'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/sprockets-rail
s-2.3.0/lib/sprockets/rails/legacy_asset_tag_helper.rb:7:in `<module:LegacyAsset
TagHelper>'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/sprockets-rail
s-2.3.0/lib/sprockets/rails/legacy_asset_tag_helper.rb:6:in `<module:Rails>'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/sprockets-rail
s-2.3.0/lib/sprockets/rails/legacy_asset_tag_helper.rb:4:in `<module:Sprockets>'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/sprockets-rail
s-2.3.0/lib/sprockets/rails/legacy_asset_tag_helper.rb:3:in `<top (required)>'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/sprockets-rail
s-2.3.0/lib/sprockets/rails/helper.rb:54:in `require'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/sprockets-rail
s-2.3.0/lib/sprockets/rails/helper.rb:54:in `<module:Helper>'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/sprockets-rail
s-2.3.0/lib/sprockets/rails/helper.rb:7:in `<module:Rails>'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/sprockets-rail
s-2.3.0/lib/sprockets/rails/helper.rb:6:in `<module:Sprockets>'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/sprockets-rail
s-2.3.0/lib/sprockets/rails/helper.rb:5:in `<top (required)>'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/sprockets-rail
s-2.3.0/lib/sprockets/railtie.rb:6:in `require'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/sprockets-rail
s-2.3.0/lib/sprockets/railtie.rb:6:in `<top (required)>'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0
.3/lib/sass/rails/railtie.rb:3:in `require'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0
.3/lib/sass/rails/railtie.rb:3:in `<top (required)>'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0
.3/lib/sass/rails.rb:11:in `require'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0
.3/lib/sass/rails.rb:11:in `<top (required)>'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0
.3/lib/sass-rails.rb:1:in `require'
/home/user/app/tmp/build-%s2267/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0
.3/lib/sass-rails.rb:1:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.2.1#global/gems/bundler-1.8.4/lib/bundler/runtime.rb:
76:in `require'
/usr/local/rvm/gems/ruby-2.2.1#global/gems/bundler-1.8.4/lib/bundler/runtime.rb:
76:in `block (2 levels) in require'
/usr/local/rvm/gems/ruby-2.2.1#global/gems/bundler-1.8.4/lib/bundler/runtime.rb:
72:in `each'
/usr/local/rvm/gems/ruby-2.2.1#global/gems/bundler-1.8.4/lib/bundler/runtime.rb:
72:in `block in require'
/usr/local/rvm/gems/ruby-2.2.1#global/gems/bundler-1.8.4/lib/bundler/runtime.rb:
61:in `each'
/usr/local/rvm/gems/ruby-2.2.1#global/gems/bundler-1.8.4/lib/bundler/runtime.rb:
61:in `require'
/usr/local/rvm/gems/ruby-2.2.1#global/gems/bundler-1.8.4/lib/bundler.rb:134:in `
require'
/home/user/app/tmp/build-%s2267/config/application.rb:7:in `<top (required)>
'
/home/user/app/tmp/build-%s2267/Rakefile:4:in `require'
/home/user/app/tmp/build-%s2267/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)
! ERROR: Deploy failed.
-----> Cleaning up build
$ rm -rf "./tmp/build-%s2267"
Unlinking current
$ rm -f "deploy.lock"
OK
Connection to 45.45.45.45 closed.
It seems that all the necessary gems are being installed except for Nokogiri. I'm not sure how to fix this.
This is my Gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
gem 'coffee-script-source', '1.8.0'
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'khipu'
gem 'mina'
gem 'nokogiri', '1.6.1'
# gem 'unicorn'
gem 'spree_khipu', :path => '../spree_khipu'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'spree', github: 'spree/spree', branch: '3-0-stable'
gem 'spree_gateway', github: 'spree/spree_gateway', branch: '3-0-stable'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '3-0-stable'
gem 'spree_i18n', :github => 'spree/spree_i18n', branch: '3-0-stable'
gem 'spree_slider', github: 'spree-contrib/spree_slider'
gem 'spree_static_content', github: 'spree-contrib/spree_static_content', branch: '3-0-stable'
gem 'bootstrap-sass', '~> 3.3.4'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
gem 'thin'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
group :production do
gem 'pg'
end
Finally a fix this by bundle install on a linux machine so the Gemfile.lock get updated, then I try again to mina deploy and everything works fine.
Couldn't figure out what was the exact problem with my previous version of the Gemfile.lock
Related
I am new to ruby, and is following some guide on first deploy of a website. I find it difficult to follow exactly what the author said since it has been written for quite a while.
Here is what happens after I typed in git push heroku master
Counting objects: 68, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (57/57), done.
Writing objects: 100% (68/68), 17.29 KiB | 0 bytes/s, done.
Total 68 (delta 5), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.2.6
remote: -----> Installing dependencies using bundler 1.13.7
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Warning: the running version of Bundler (1.13.7) is older than the version that created the lockfile (1.14.4). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote: Fetching gem metadata from https://rubygems.org/..........
remote: Fetching version metadata from https://rubygems.org/..
remote: Fetching dependency metadata from https://rubygems.org/.
remote: Installing i18n 0.8.1
remote: Installing rake 12.0.0
remote: Installing json 1.8.6 with native extensions
remote: Installing minitest 5.10.1
remote: Installing thread_safe 0.3.6
remote: Installing builder 3.2.3
remote: Installing erubis 2.7.0
remote: Installing mini_portile2 2.1.0
remote: Installing rack 1.6.5
remote: Installing arel 6.0.4
remote: Installing mime-types-data 3.2016.0521
remote: Installing execjs 2.7.0
remote: Installing coffee-script-source 1.12.2
remote: Installing thor 0.19.4
remote: Installing concurrent-ruby 1.0.5
remote: Installing multi_json 1.12.1
remote: Installing pg 0.20.0 with native extensions
remote: Using bundler 1.13.7
remote: Installing rails_serve_static_assets 0.0.5
remote: Installing rails_stdout_logging 0.0.5
remote: Installing rdoc 4.3.0
remote: Installing sass 3.4.23
remote: Installing tilt 1.4.1
remote: Installing turbolinks-source 5.0.0
remote: Installing tzinfo 1.2.3
remote: Installing nokogiri 1.7.1 with native extensions
remote: Installing rack-test 0.6.3
remote: Installing mime-types 3.1
remote: Installing coffee-script 2.4.1
remote: Installing uglifier 1.3.0
remote: Installing sprockets 3.7.1
remote: Installing rails_12factor 0.0.3
remote: Installing turbolinks 5.0.1
remote: Installing mail 2.6.4
remote: Installing loofah 2.0.3
remote: Installing rails-html-sanitizer 1.0.3
remote: Installing sdoc 0.4.0
remote: Installing activesupport 4.2.5
remote: Installing globalid 0.3.7
remote: Installing rails-deprecated_sanitizer 1.0.3
remote: Installing activemodel 4.2.5
remote: Installing jbuilder 2.0.0
remote: Installing activejob 4.2.5
remote: Installing rails-dom-testing 1.0.8
remote: Installing activerecord 4.2.5
remote: Installing actionview 4.2.5
remote: Installing actionpack 4.2.5
remote: Installing sprockets-rails 3.2.0
remote: Installing actionmailer 4.2.5
remote: Installing railties 4.2.5
remote: Installing coffee-rails 4.1.0
remote: Installing sass-rails 5.0.0
remote: Installing jquery-rails 4.3.1
remote: Installing rails 4.2.5
remote: Bundle complete! 14 Gemfile dependencies, 54 gems now installed.
remote: Gems in the groups development and test were not installed.
remote: Bundled gems are installed into ./vendor/bundle.
remote: Bundle completed (23.25s)
remote: Cleaning up the bundler cache.
remote: -----> Installing node-v6.10.0-linux-x64
remote: -----> Detecting rake tasks
remote: sh: 1: Syntax error: word unexpected (expecting ")")
remote: sh: 1: Syntax error: word unexpected (expecting ")")
remote: !
remote: ! Could not detect rake tasks
remote: ! ensure you can run `$ bundle exec rake -P` against your app
remote: ! and using the production group of your Gemfile.
remote: ! rake aborted!
remote: ! Bundler::GemRequireError: There was an error while trying to load the gem 'sass-rails'.
remote: ! Gem Load Error is: uninitialized constant Sass::Script
remote: ! Backtrace for gem load error is:
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0.0/lib/sass/rails/helpers.rb:11:in `<top (required)>'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0.0/lib/sass/rails.rb:8:in `require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0.0/lib/sass/rails.rb:8:in `<top (required)>'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0.0/lib/sass-rails.rb:1:in `require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0.0/lib/sass-rails.rb:1:in `<top (required)>'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:91:in `require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:86:in `each'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:86:in `block in require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:75:in `each'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:75:in `require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler.rb:106:in `require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/config/application.rb:7:in `<top (required)>'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/Rakefile:4:in `require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/Rakefile:4:in `<top (required)>'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load_rakefile'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:687:in `raw_load_rakefile'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:96:in `block in load_rakefile'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:95:in `load_rakefile'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:79:in `block in run'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
remote: ! vendor/bundle/bin/rake:17:in `load'
remote: ! vendor/bundle/bin/rake:17:in `<main>'
remote: ! Bundler Error Backtrace:
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:94:in `rescue in block (2 levels) in require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:90:in `block (2 levels) in require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:86:in `each'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:86:in `block in require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:75:in `each'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:75:in `require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler.rb:106:in `require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/config/application.rb:7:in `<top (required)>'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/Rakefile:4:in `require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/Rakefile:4:in `<top (required)>'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load_rakefile'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:687:in `raw_load_rakefile'
......
remote: from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:16:in `instrument'
remote: from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:35:in `trace'
remote: from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/bin/ruby_compile:11:in `<main>'
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy....
remote:
remote: ! Push rejected to hidden-eyrie-90646.
remote:
To https://git.heroku.com/hidden-eyrie-90646.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/hidden-eyrie-90646.git'
But when I typed in the command `$ bundle install --without production`
It seems alright:
`Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Using rake 12.0.0
Using i18n 0.8.1
Using json 1.8.6
Using minitest 5.10.1
Using thread_safe 0.3.6
Using builder 3.2.3
Using erubis 2.7.0
Using mini_portile2 2.1.0
Using rack 1.6.5
Using mime-types-data 3.2016.0521
Using arel 6.0.4
Using coffee-script-source 1.12.2
Using execjs 2.7.0
Using thor 0.19.4
Using concurrent-ruby 1.0.5
Using multi_json 1.12.1
Using rack-timeout 0.3.2
Using bundler 1.14.4
Using rdoc 4.3.0
Using sass 3.4.23
Using tilt 1.4.1
Using sqlite3 1.3.13
Using turbolinks-source 5.0.0
Using tzinfo 1.2.3
Using nokogiri 1.7.1
Using rack-test 0.6.3
Using mime-types 3.1
Using coffee-script 2.4.1
Using sprockets 3.7.1
Using uglifier 1.3.0
Using sdoc 0.4.0
Using turbolinks 5.0.1
Using activesupport 4.2.5
Using loofah 2.0.3
Using mail 2.6.4
Using rails-deprecated_sanitizer 1.0.3
Using globalid 0.3.7
Using activemodel 4.2.5
Using jbuilder 2.0.0
Using spring 2.0.1
Using rails-html-sanitizer 1.0.3
Using rails-dom-testing 1.0.8
Using activejob 4.2.5
Using activerecord 4.2.5
Using actionview 4.2.5
Using actionpack 4.2.5
Using actionmailer 4.2.5
Using railties 4.2.5
Using sprockets-rails 3.2.0
Using coffee-rails 4.1.0
Using jquery-rails 4.3.1
Using rails 4.2.5
Using sass-rails 5.0.0
Bundle complete! 13 Gemfile dependencies, 53 gems now installed.
Gems in the group production were not installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.`
(I deleted some message because it exceeded the length limit of stackoverflow.)
My Gemfile is:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.5'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', group: [:development, :test]
# Use postgresql as database for production
group :production do
gem 'pg'
gem 'rails_12factor'
end
# Use SCSS for stylesheets
gem 'sass-rails', ' 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', ' 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', ' 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', ' 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', ' 0.4.0', group: :doc
gem 'spring', group: :development
gem 'rack-timeout', '0.3.2'
# Use ActiveModel has_secure_password
# gem 'bcrypt', ' 3.1.7'
# Use Unicorn as the app server
# gem 'unicorn'
# 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'
#end
#group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
# gem 'web-console', ' 2.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
# gem 'spring'
#end
My Gemfile is not the same as the lecturer presented, because somehow I can't install the 4.1.0 version Ruby (mine is 4.2.5) on Cloud9 IDE.
And here is the lecturer's Gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', group: [:development, :test]
# Use postgresql as database for production
group :production do
gem 'pg'
gem 'rails_12factor'
end
# Use SCSS for stylesheets
gem 'sass-rails', ' 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', ' 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', ' 4.0.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', ' 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', ' 0.4.0', group: :doc
gem 'spring', group: :development
What should I do? Thank you in advance.
your gem version is
gem 'sass-rails', ' 5.0'
change it to
gem 'sass-rails', '5.0.3' or gem 'sass-rails', '5.0.2'
or do
bundle update sass-rails
which ultimately updates you saas-rails gem to the latest one. Or you can enter the version in your gemfile as specified above.
I'm in the deployment section of the first chapter of the Ruby on Rails tutorial, and I can't make things work! I'm using the Cloud9 workspace.
My Gemfile is:
source 'https://rubygems.org'
ruby '2.2.1'
gem 'rails', '4.2.0'
gem 'sass-rails', '5.0.1'
gem 'uglifier', '2.5.3'
gem 'coffee-rails', '4.1.0'
gem 'jquery-rails', '4.0.3'
gem 'turbolinks', '2.3.0'
gem 'jbuilder', '2.2.3'
gem 'sdoc', '0.4.0', group: :doc
group :development, :test do
gem 'sqlite3', '1.3.9'
gem 'byebug', '3.4.0'
gem 'web-console', '2.0.0.beta3'
gem 'spring', '1.1.3'
end
group :production do
gem 'pg', '0.17.1'
gem 'rails_12factor', '0.0.2'
end
My Heroku installation log is:
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.2.1
-----> Installing dependencies using 1.9.7
Ruby version change detected. Clearing bundler cache.
Old: ruby 2.0.0p645 (2015-04-13 revision 50299) [x86_64-linux]
New: ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Using rake 10.4.2
Installing minitest 5.7.0
Installing i18n 0.7.0
Installing builder 3.2.2
Installing thread_safe 0.3.5
Installing mini_portile 0.6.2
Installing erubis 2.7.0
Installing rack 1.6.4
Installing mime-types 2.6.1
Installing coffee-script-source 1.9.1.1
Installing arel 6.0.2
Installing json 1.8.3
Installing execjs 2.5.2
Installing thor 0.19.1
Using bundler 1.9.7
Installing multi_json 1.11.2
Installing rails_stdout_logging 0.0.3
Using rdoc 4.2.0
Installing rails_serve_static_assets 0.0.4
Installing tilt 1.4.1
Installing sass 3.4.16
Installing tzinfo 1.2.2
Installing rack-test 0.6.3
Installing sprockets 3.2.0
Installing mail 2.6.3
Installing coffee-script 2.4.1
Installing uglifier 2.5.3
Installing sdoc 0.4.0
Installing rails_12factor 0.0.2
Installing activesupport 4.2.0
Installing rails-deprecated_sanitizer 1.0.3
Installing globalid 0.3.5
Installing activemodel 4.2.0
Installing jbuilder 2.2.3
Installing activejob 4.2.0
Installing activerecord 4.2.0
Installing pg 0.17.1
Installing nokogiri 1.6.6.2
Installing loofah 2.0.2
Installing rails-dom-testing 1.0.6
Installing rails-html-sanitizer 1.0.2
Installing actionview 4.2.0
Installing actionpack 4.2.0
Installing sprockets-rails 2.3.2
Installing actionmailer 4.2.0
Installing railties 4.2.0
Installing coffee-rails 4.1.0
Installing jquery-rails 4.0.3
Installing rails 4.2.0
Installing sass-rails 5.0.1
Installing turbolinks 2.3.0
Bundle complete! 14 Gemfile dependencies, 51 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into ./vendor/bundle.
Bundle completed (35.52s)
Cleaning up the bundler cache.
Could not detect rake tasks
ensure you can run `$ bundle exec rake -P` against your app with no environment variables present
and using the production group of your Gemfile.
rake aborted!
NameError: uninitialized constant Sass::Script
/tmp/build_e66783d527b235cf6db9221a52037d9b/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0.1/lib/sass/rails/helpers.rb:11:in `<top (required)>'
/tmp/build_e66783d527b235cf6db9221a52037d9b/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0.1/lib/sass/rails.rb:8:in `require'
/tmp/build_e66783d527b235cf6db9221a52037d9b/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0.1/lib/sass/rails.rb:8:in `<top (required)>'
/tmp/build_e66783d527b235cf6db9221a52037d9b/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0.1/lib/sass-rails.rb:1:in `require'
/tmp/build_e66783d527b235cf6db9221a52037d9b/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0.1/lib/sass-rails.rb:1:in `<top (required)>'
/tmp/build_e66783d527b235cf6db9221a52037d9b/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `require'
/tmp/build_e66783d527b235cf6db9221a52037d9b/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
/tmp/build_e66783d527b235cf6db9221a52037d9b/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `each'
/tmp/build_e66783d527b235cf6db9221a52037d9b/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `block in require'
/tmp/build_e66783d527b235cf6db9221a52037d9b/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `each'
/tmp/build_e66783d527b235cf6db9221a52037d9b/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `require'
/tmp/build_e66783d527b235cf6db9221a52037d9b/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler.rb:134:in `require'
/tmp/build_e66783d527b235cf6db9221a52037d9b/config/application.rb:7:in `<top (required)>'
/tmp/build_e66783d527b235cf6db9221a52037d9b/Rakefile:4:in `require'
/tmp/build_e66783d527b235cf6db9221a52037d9b/Rakefile:4:in `<top (required)>'
/tmp/build_e66783d527b235cf6db9221a52037d9b/vendor/ruby-2.2.1/lib/ruby/2.2.0/rake/rake_module.rb:28:in `load'
/tmp/build_e66783d527b235cf6db9221a52037d9b/vendor/ruby-2.2.1/lib/ruby/2.2.0/rake/rake_module.rb:28:in `load_rakefile'
/tmp/build_e66783d527b235cf6db9221a52037d9b/vendor/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:689:in `raw_load_rakefile'
/tmp/build_e66783d527b235cf6db9221a52037d9b/vendor/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:94:in `block in load_rakefile'
/tmp/build_e66783d527b235cf6db9221a52037d9b/vendor/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:176:in `standard_exception_handling'
/tmp/build_e66783d527b235cf6db9221a52037d9b/vendor/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:93:in `load_rakefile'
/tmp/build_e66783d527b235cf6db9221a52037d9b/vendor/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:77:in `block in run'
/tmp/build_e66783d527b235cf6db9221a52037d9b/vendor/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:176:in `standard_exception_handling'
/tmp/build_e66783d527b235cf6db9221a52037d9b/vendor/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:75:in `run'
/tmp/build_e66783d527b235cf6db9221a52037d9b/vendor/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
vendor/bundle/bin/rake:16:in `load'
vendor/bundle/bin/rake:16:in `<main>'
###### WARNING:
No Procfile detected, using the default web server (webrick)
https://devcenter.heroku.com/articles/ruby-default-web-server
-----> Discovering process types
Procfile declares types -> (none)
Default types for Ruby -> console, rake, web, worker
-----> Compressing... done, 29.1MB
-----> Launching... done, v6
https://lit-caverns-5466.herokuapp.com/ deployed to Heroku
When I open the link I get the message:
Application Error
An error occurred in the application and your page could not be
served. Please try again in a few moments.
If you are the application owner, check your logs for details.
Does your app run successfully in production mode locally ? If not try to run your app locally in production mode and you might be able to spot the issue.
bundle install --without development:test
RAILS_ENV=production rake db:create db:migrate
RAILS_ENV=production rails s
I'm going through Lynda tutorials and i'm trying to start a server , but i get an error saying
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.3/lib/action_view/helpers.
rb:40:in `': uninitialized constant ActionView::Helpers::ActiveM
odelHelper (NameError) .
I did run bundle install before that . I copied here gem file as well
C:\Users\berutiel\Documents\sites\tut>bundle install
Resolving dependencies...
Using rake 10.4.2
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.7.0
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.2.3
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile 0.6.2
Using nokogiri 1.6.6.2
Using rails-deprecated_sanitizer 1.0.3
Using rails-dom-testing 1.0.6
Using loofah 2.0.2
Using rails-html-sanitizer 1.0.2
Using actionview 4.2.3
Using rack 1.6.4
Using rack-test 0.6.3
Using actionpack 4.2.3
Using globalid 0.3.5
Using activejob 4.2.3
Using mime-types 2.6.1
Using mail 2.6.3
Using actionmailer 4.2.3
Using activemodel 4.2.3
Using arel 6.0.2
Using activerecord 4.2.3
Using debug_inspector 0.0.2
Using binding_of_caller 0.7.2
Using bundler 1.10.6
Using columnize 0.9.0
Using byebug 5.0.0
Using multi_json 1.11.2
Using jbuilder 2.3.1
Using mysql2 0.3.19
Using thor 0.19.1
Using railties 4.2.3
Using sprockets 3.2.0
Using sprockets-rails 2.3.2
Using rails 4.2.3
Using rdoc 4.2.0
Using sdoc 0.4.1
Using tzinfo-data 1.2015.5
Using web-console 2.2.1
Bundle complete! 8 Gemfile dependencies, 44 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
C:\Users\berutiel\Documents\sites\tut>rails server
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview- 4.2.3/lib/action_view/helpers.
rb:40:in <module:Helpers>': uninitialized constant ActionView::Helpers::ActiveM
odelHelper (NameError)
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview- 4.2.3/lib/action_
view/helpers.rb:4:in <module:ActionView>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview- 4.2.3/lib/action_
view/helpers.rb:3:in <top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview- 4.2.3/lib/action_
view/base.rb:5:in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.3/lib/action_
view/base.rb:5:in <top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web_co
nsole/template.rb:7:in <class:Template>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web_co
nsole/template.rb:6:in <module:WebConsole>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console- 2.2.1/lib/web_co
nsole/template.rb:1:in <top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web_co
nsole.rb:12:in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web_co
nsole.rb:12:in <top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web-co
nsole.rb:1:in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web-co
nsole.rb:1:in <top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/r
untime.rb:76:in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/r
untime.rb:76:in block (2 levels) in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/r
untime.rb:72:in each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/r
untime.rb:72:in block in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/r
untime.rb:61:in each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/r
untime.rb:61:in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler.r
b:134:in require'
from C:/Users/berutiel/Documents/sites/tut/config/application.rb:7:in <
top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/com
mands/commands_tasks.rb:78:in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/com
mands/commands_tasks.rb:78:in block in server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/com
mands/commands_tasks.rb:75:in tap'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/com
mands/commands_tasks.rb:75:in server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/com
mands/commands_tasks.rb:39:in run_command!'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/com
mands.rb:17:in <top (required)>'
from bin/rails:4:in require'
from bin/rails:4:in <main>'
ource 'https://rubygems.org'
Gemfile
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.3'
# Use mysql as the database for Active Record
gem 'mysql2'
# Use SCSS for stylesheets
#gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
#gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
#gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
#gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
#gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'rack', '~> 1.6.4'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Unicorn as the app server
# gem 'unicorn'
# 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'
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
That's weird. The error message you pasted appears to have a typo in it; can you confirm that there's really a space between the M and O of "Model" in this error message?
uninitialized constant ActionView::Helpers::ActiveM odelHelper (NameError) .
Anyway I'd try troubleshooting this in a couple ways:
Can you verify that the Rails gem is installed, and is in the right place? In the app directory, run bundle show nokogiri to find out where the gem nokogiri is installed (or pick any other gem that doesn't appear to be giving errors), then run bundle show rails to verify that Rails is installed inside the same path.
Does actionview show up inside your Gemfile.lock? This file is the "compiled" version of your Gemfile and lists the exact version of every gem dependency your app has. Everything listed here should be installed, so open that and verify that ActionView is in the list. It definitely should be since the rails gem includes / depends on it.
Can you reproduce the problem with a brand new app? Start a fresh app by going out of your app directory, tying rails new test_app, then cd in and run bundle install to install the default gems for this app, then run rails server to see if the error shows up as before. If it DOES reproduce with a fresh app, then you have much more concrete steps for the problem that you can post in the question here to make it easier for us to troubleshoot.
Good luck! Initial setup with the Rails environment can be intensely frustrating, but It Gets Better.
I went through this solution ,RubyInstaller 2.2.1 and Rails - Rake cannot load Nokogiri
The problem is resolved
Thanks to everyone
Hi I am beginner for ROR deployment. I tried heroku deployment. But it's not working. I my gem file I have put following gems
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.8'
# Use sqlite3 as the database for Active Record
group :production, :staging do
gem "pg"
end
group :development, :test do
gem "sqlite3"
end
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'byebug'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin]
gem 'coffee-script-source', '1.8.0'
gem 'bcrypt'
My database.yml looks like
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
#
default: &default
adapter: sqlite3
pool: 5
timeout: 5000
development:
<<: *default
database: db/development.sqlite3
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
database: db/test.sqlite3
production:
adapter: postgresql
database: db/production.sqlite3
pool: 5
timeout: 5000
I am getting following error on heroku console:
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
###### 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.9.7
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...
Rubygems 2.0.14 is not threadsafe, so your gems must be installed one at a time. Upgrade to Rubygems 2.1.0 or higher to enable parallel gem installation.
Installing rake 10.4.2
Installing i18n 0.7.0
Installing json 1.8.3
Installing minitest 5.7.0
Installing thread_safe 0.3.5
Installing tzinfo 1.2.2
Installing activesupport 4.1.8
Installing builder 3.2.2
Installing erubis 2.7.0
Installing actionview 4.1.8
Installing rack 1.5.5
Installing rack-test 0.6.3
Installing actionpack 4.1.8
Installing mime-types 2.6.1
Installing mail 2.6.3
Installing actionmailer 4.1.8
Installing activemodel 4.1.8
Installing arel 5.0.1.20140414130214
Installing activerecord 4.1.8
Installing bcrypt 3.1.10
Using bundler 1.9.7
Installing columnize 0.9.0
Installing byebug 5.0.0
Installing coffee-script-source 1.8.0
Installing execjs 2.5.2
Installing coffee-script 2.4.1
Installing thor 0.19.1
Installing railties 4.1.8
Installing coffee-rails 4.0.1
Installing hike 1.2.3
Installing multi_json 1.11.2
Installing jbuilder 2.3.1
Installing jquery-rails 3.1.3
Installing pg 0.18.2
Installing tilt 1.4.1
Installing sprockets 2.12.4
Installing sprockets-rails 2.3.2
Installing rails 4.1.8
Installing rdoc 4.2.0
Installing sass 3.2.19
Installing sass-rails 4.0.5
Installing sdoc 0.4.1
Installing turbolinks 2.5.3
Installing uglifier 2.7.1
Bundle complete! 14 Gemfile dependencies, 44 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into ./vendor/bundle.
Post-install message from rdoc:
Depending on your version of ruby, you may need to install ruby rdoc/ri data:
<= 1.8.6 : unsupported
= 1.8.7 : gem install rdoc-data; rdoc-data --install
= 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
Bundle completed (52.02s)
Cleaning up the bundler cache.
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
DEPRECATION WARNING: Paths in SQLite3 database URLs of the form `sqlite3:///path` will be treated as absolute in Rails 4.2. Please switch to `sqlite3:dbname`. (called from <top (required)> at /tmp/build_7c327500f441bbe0f5ec1b5b2f7a306a/Rakefile:6)
rake aborted!
Gem::LoadError: Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 'sqlite3'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
/tmp/build_7c327500f441bbe0f5ec1b5b2f7a306a/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/connection_specification.rb:190:in `rescue in spec'
/tmp/build_7c327500f441bbe0f5ec1b5b2f7a306a/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/connection_specification.rb:187:in `spec'
/tmp/build_7c327500f441bbe0f5ec1b5b2f7a306a/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/connection_handling.rb:50:in `establish_connection'
/tmp/build_7c327500f441bbe0f5ec1b5b2f7a306a/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/railtie.rb:129:in `block (2 levels) in <class:Railtie>'
/tmp/build_7c327500f441bbe0f5ec1b5b2f7a306a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/tmp/build_7c327500f441bbe0f5ec1b5b2f7a306a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/tmp/build_7c327500f441bbe0f5ec1b5b2f7a306a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
/tmp/build_7c327500f441bbe0f5ec1b5b2f7a306a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/lazy_load_hooks.rb:27:in `each'
/tmp/build_7c327500f441bbe0f5ec1b5b2f7a306a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
/tmp/build_7c327500f441bbe0f5ec1b5b2f7a306a/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/railtie.rb:118:in `block in <class:Railtie>'
/tmp/build_7c327500f441bbe0f5ec1b5b2f7a306a/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_7c327500f441bbe0f5ec1b5b2f7a306a/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/initializable.rb:30:in `run'
/tmp/build_7c327500f441bbe0f5ec1b5b2f7a306a/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_7c327500f441bbe0f5ec1b5b2f7a306a/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_7c327500f441bbe0f5ec1b5b2f7a306a/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/application.rb:300:in `initialize!'
/tmp/build_7c327500f441bbe0f5ec1b5b2f7a306a/config/environment.rb:5:in `<top (required)>'
/tmp/build_7c327500f441bbe0f5ec1b5b2f7a306a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_7c327500f441bbe0f5ec1b5b2f7a306a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `block in require'
/tmp/build_7c327500f441bbe0f5ec1b5b2f7a306a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:232:in `load_dependency'
/tmp/build_7c327500f441bbe0f5ec1b5b2f7a306a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_7c327500f441bbe0f5ec1b5b2f7a306a/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/application.rb:276:in `require_environment!'
/tmp/build_7c327500f441bbe0f5ec1b5b2f7a306a/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/application.rb:389:in `block in run_tasks_blocks'
/tmp/build_7c327500f441bbe0f5ec1b5b2f7a306a/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.3.2/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
Tasks: TOP => environment
(See full trace by running task with --trace)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app
I am using windows os for the development.
I am not able to figure it out what is the error? Need some help. Thank you.
After Adding rails_12factor into gem file I am getting following error on heroku logs
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
###### 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.9.7
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies....
Rubygems 2.0.14 is not threadsafe, so your gems must be installed one at a time. Upgrade to Rubygems 2.1.0 or higher to enable parallel gem installation.
Installing rake 10.4.2
Installing i18n 0.7.0
Installing json 1.8.3
Installing minitest 5.7.0
Installing thread_safe 0.3.5
Installing tzinfo 1.2.2
Installing activesupport 4.1.8
Installing builder 3.2.2
Installing erubis 2.7.0
Installing actionview 4.1.8
Installing rack 1.5.5
Installing rack-test 0.6.3
Installing actionpack 4.1.8
Installing mime-types 2.6.1
Installing mail 2.6.3
Installing actionmailer 4.1.8
Installing activemodel 4.1.8
Installing arel 5.0.1.20140414130214
Installing activerecord 4.1.8
Installing bcrypt 3.1.10
Using bundler 1.9.7
Installing columnize 0.9.0
Installing byebug 5.0.0
Installing coffee-script-source 1.8.0
Installing execjs 2.5.2
Installing coffee-script 2.4.1
Installing thor 0.19.1
Installing railties 4.1.8
Installing coffee-rails 4.0.1
Installing hike 1.2.3
Installing multi_json 1.11.2
Installing jbuilder 2.3.1
Installing jquery-rails 3.1.3
Installing pg 0.18.2
Installing tilt 1.4.1
Installing sprockets 2.12.4
Installing sprockets-rails 2.3.2
Installing rails 4.1.8
Installing rdoc 4.2.0
Installing sass 3.2.19
Installing sass-rails 4.0.5
Installing sdoc 0.4.1
Installing turbolinks 2.5.3
Installing uglifier 2.7.1
Bundle complete! 15 Gemfile dependencies, 44 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into ./vendor/bundle.
Post-install message from rdoc:
Depending on your version of ruby, you may need to install ruby rdoc/ri data:
<= 1.8.6 : unsupported
= 1.8.7 : gem install rdoc-data; rdoc-data --install
= 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
Bundle completed (57.99s)
Cleaning up the bundler cache.
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
DEPRECATION WARNING: Paths in SQLite3 database URLs of the form `sqlite3:///path` will be treated as absolute in Rails 4.2. Please switch to `sqlite3:dbname`. (called from <top (required)> at /tmp/build_0e966ea42527f491d64dc7a384ec85b6/Rakefile:6)
rake aborted!
Gem::LoadError: Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 'sqlite3'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
/tmp/build_0e966ea42527f491d64dc7a384ec85b6/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/connection_specification.rb:190:in `rescue in spec'
/tmp/build_0e966ea42527f491d64dc7a384ec85b6/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/connection_specification.rb:187:in `spec'
/tmp/build_0e966ea42527f491d64dc7a384ec85b6/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/connection_handling.rb:50:in `establish_connection'
/tmp/build_0e966ea42527f491d64dc7a384ec85b6/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/railtie.rb:129:in `block (2 levels) in <class:Railtie>'
/tmp/build_0e966ea42527f491d64dc7a384ec85b6/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/tmp/build_0e966ea42527f491d64dc7a384ec85b6/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/tmp/build_0e966ea42527f491d64dc7a384ec85b6/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
/tmp/build_0e966ea42527f491d64dc7a384ec85b6/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/lazy_load_hooks.rb:27:in `each'
/tmp/build_0e966ea42527f491d64dc7a384ec85b6/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
/tmp/build_0e966ea42527f491d64dc7a384ec85b6/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/railtie.rb:118:in `block in <class:Railtie>'
/tmp/build_0e966ea42527f491d64dc7a384ec85b6/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_0e966ea42527f491d64dc7a384ec85b6/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/initializable.rb:30:in `run'
/tmp/build_0e966ea42527f491d64dc7a384ec85b6/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_0e966ea42527f491d64dc7a384ec85b6/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_0e966ea42527f491d64dc7a384ec85b6/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/application.rb:300:in `initialize!'
/tmp/build_0e966ea42527f491d64dc7a384ec85b6/config/environment.rb:5:in `<top (required)>'
/tmp/build_0e966ea42527f491d64dc7a384ec85b6/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_0e966ea42527f491d64dc7a384ec85b6/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `block in require'
/tmp/build_0e966ea42527f491d64dc7a384ec85b6/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:232:in `load_dependency'
/tmp/build_0e966ea42527f491d64dc7a384ec85b6/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_0e966ea42527f491d64dc7a384ec85b6/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/application.rb:276:in `require_environment!'
/tmp/build_0e966ea42527f491d64dc7a384ec85b6/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/application.rb:389:in `block in run_tasks_blocks'
/tmp/build_0e966ea42527f491d64dc7a384ec85b6/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.3.2/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
Tasks: TOP => environment
(See full trace by running task with --trace)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app
Its related to sqlite3.
You need to add the following into your gemfile and then bundle:
group :production do
gem 'rails_12factor', '0.0.2'
end
This will hopefully resolve your problem.
I'm a Rails 4 beginner who's been up all night stuck trying to start up my rails server. I'm working through Hartls' Ruby on Rails tutorial 3rd edition for Rails 4. I've been able to complete a \ "hello world" style app and run it on my local server. Heck, I even set up the toy_app in chapter 2 that allowed some user input and microblogging.
Suddenly, things have changed, and I'm stuck. I can't run rails server on any new apps I create. Here's what I mean:
First, I run the same commands to set up an app in my workspace:
cd
cd workspace
rails _4.2.2_ new sample_app
This returns the same basic Rails structure as my two previously successful apps. Now, I open the gem file, and I edit the gem file to look like the one Hartl has listed for the Chapter 3 exercise.
Here is the Gem file:
source 'https://rubygems.org'
gem 'rails', '4.2.2'
gem 'sass-rails', '5.0.2'
gem 'uglifier', '2.5.3'
gem 'coffee-rails', '4.1.0'
gem 'jquery-rails', '4.0.3'
gem 'turbolinks', '2.3.0'
gem 'jbuilder', '2.2.3'
gem 'sdoc', '0.4.0', group: :doc
group :development, :test do
gem 'sqlite3', '1.3.9'
gem 'byebug', '3.4.0'
gem 'web-console', '2.0.0.beta3'
gem 'spring', '1.1.3'
end
Next, I run bundle_install, and this is what I get back from the terminal (I'm on a Mac):
Resolving dependencies...
Using rake 10.4.2
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.7.0
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.2.2
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile 0.6.2
Using nokogiri 1.6.6.2
Using rails-deprecated_sanitizer 1.0.3
Using rails-dom-testing 1.0.6
Using loofah 2.0.2
Using rails-html-sanitizer 1.0.2
Using actionview 4.2.2
Using rack 1.6.4
Using rack-test 0.6.3
Using actionpack 4.2.2
Using globalid 0.3.5
Using activejob 4.2.2
Using mime-types 2.6.1
Using mail 2.6.3
Using actionmailer 4.2.2
Using activemodel 4.2.2
Using arel 6.0.1
Using activerecord 4.2.2
Using debug_inspector 0.0.2
Using binding_of_caller 0.7.3.pre1 (was 0.7.2)
Using bundler 1.9.6
Using columnize 0.9.0
Using debugger-linecache 1.2.0
Using slop 3.6.0
Using byebug 3.4.0 (was 5.0.0)
Using coffee-script-source 1.9.1.1
Using execjs 2.5.2
Using coffee-script 2.4.1
Using thor 0.19.1
Using railties 4.2.2
Using coffee-rails 4.1.0
Using multi_json 1.11.2
Using jbuilder 2.2.3 (was 2.3.1)
Using jquery-rails 4.0.3 (was 4.0.4)
Using sprockets 3.2.0
Using sprockets-rails 2.3.2
Using rails 4.2.2
Using rdoc 4.2.0
Using sass 3.4.16
Using tilt 1.4.1
Using sass-rails 5.0.2 (was 5.0.3)
Using sdoc 0.4.0 (was 0.4.1)
Using spring 1.1.3 (was 1.3.6)
Using sqlite3 1.3.9 (was 1.3.10)
Using turbolinks 2.3.0 (was 2.5.3)
Using uglifier 2.5.3 (was 2.7.1)
Using web-console 2.0.0.beta3 (was 2.2.1)
Bundle complete! 12 Gemfile dependencies, 56 gems now installed.
Gems in the group production were not installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
I notice this time around that the terminal does not prompt me for my password, which I believe it had in the past. I'm assuming that the error is happening here with the bundler, but I'm not sure what it is. Does it have to do with skipping the production group? I know Hartl recommends skipping it later for the sake of heroku deployment, but I don't even have a production group listed in my Gemfile yet! Anyway, next I call
cd ~/workspace/sample_app
rails server
And here is what I get back:
Warning: Running `gem pristine --all` to regenerate your installed gemspecs (and deleting then reinstalling your bundle if you use bundle --path) will improve the startup performance of Spring.
/Library/Ruby/Gems/2.0.0/gems/railties- 4.2.2/lib/rails/railtie/configuration.rb:95:in `method_missing': undefined method `active_record' for #<Rails::Application::Configuration:0x007fd1dc4fb158> (NoMethodError)
from /Users/SSSPro02/workspace/matt_app/config/application.rb:24:in `<class:Application>'
from /Users/SSSPro02/workspace/matt_app/config/application.rb:10:in `<module:MattApp>'
from /Users/SSSPro02/workspace/matt_app/config/application.rb:9:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:78:in `require'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/SSSPro02/workspace/matt_app/bin/rails:8:in `require'
from /Users/SSSPro02/workspace/matt_app/bin/rails:8:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `load'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `call'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/lib/spring/client/command.rb:7:in `call'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/lib/spring/client.rb:26:in `run'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/bin/spring:48:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `load'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `<top (required)>'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/SSSPro02/workspace/matt_app/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
From what I gather, it's telling me it can't find 'active_record', which has not been a problem until now. I've even tried to recreate the basic hello_world app in chapter 1 with a different gem file, and I am still getting this error whenever I try to start up the server. Any help would be greatly appreciated. Let me know if there is any additional information I should include.
Try bundle update.
Try delete Gemfile.lock then bundle install again.
Verify your config/application.rb is this line present?
require "active_record/railtie"
if not add it, if yes and commented then uncomment it.
Have you tried running bundle from inside your Rails app manually? So:
cd sample_app
bundle