Rails Production Container "The page you were looking for doesn't exist." - ruby-on-rails-6

Using the Rails 6 "Blog" template guide, successfully created and ran Rails app in Development on Ubuntu 20.04.
Using this guide https://blog.engineyard.com/using-docker-for-rails, I created the production container (I needed to extend the dummy database string with a dummer key master for precomile in Rails 6). The resulting container starts but the page of smiling Rails faces (Yay! You’re on Rails!) does not appear, instead.
Note: I have read several different page opinions on Rails in Production container and they have the same basic process as the page referenced, with suble variations on environment variable placement, etc. The log from the container follows
=> Booting Puma
=> Rails 6.0.3.3 application starting in production
=> Run `rails server --help` for more startup options
Puma starting in single mode...
* Version 4.3.6 (ruby 2.7.0-p0), codename: Mysterious Traveller
* Min threads: 5, max threads: 5
* Environment: production
* Listening on tcp://0.0.0.0:3000
Use Ctrl-C to stop
I, [2020-09-26T22:29:36.819615 #1] INFO -- : [272cb1aa-9a2a-43f9-bf40-66d4b9a43211] Started GET "/" for 172.23.0.3 at 2020-09-26 22:29:36 +0000
F, [2020-09-26T22:29:36.820134 #1] FATAL -- : [272cb1aa-9a2a-43f9-bf40-66d4b9a43211]
[272cb1aa-9a2a-43f9-bf40-66d4b9a43211] ActionController::RoutingError (No route matches [GET] "/"):
[272cb1aa-9a2a-43f9-bf40-66d4b9a43211]
[272cb1aa-9a2a-43f9-bf40-66d4b9a43211] actionpack (6.0.3.3) lib/action_dispatch/middleware/debug_exceptions.rb:36:in `call'
[272cb1aa-9a2a-43f9-bf40-66d4b9a43211] actionpack (6.0.3.3) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
[272cb1aa-9a2a-43f9-bf40-66d4b9a43211] railties (6.0.3.3) lib/rails/rack/logger.rb:37:in `call_app'
[272cb1aa-9a2a-43f9-bf40-66d4b9a43211] railties (6.0.3.3) lib/rails/rack/logger.rb:26:in `block in call'
[272cb1aa-9a2a-43f9-bf40-66d4b9a43211] activesupport (6.0.3.3) lib/active_support/tagged_logging.rb:80:in `block in tagged'
[272cb1aa-9a2a-43f9-bf40-66d4b9a43211] activesupport (6.0.3.3) lib/active_support/tagged_logging.rb:28:in `tagged'
[272cb1aa-9a2a-43f9-bf40-66d4b9a43211] activesupport (6.0.3.3) lib/active_support/tagged_logging.rb:80:in `tagged'
[272cb1aa-9a2a-43f9-bf40-66d4b9a43211] railties (6.0.3.3) lib/rails/rack/logger.rb:26:in `call'
[272cb1aa-9a2a-43f9-bf40-66d4b9a43211] actionpack (6.0.3.3) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
[272cb1aa-9a2a-43f9-bf40-66d4b9a43211] actionpack (6.0.3.3) lib/action_dispatch/middleware/request_id.rb:27:in `call'
[272cb1aa-9a2a-43f9-bf40-66d4b9a43211] rack (2.2.3) lib/rack/method_override.rb:24:in `call'
[272cb1aa-9a2a-43f9-bf40-66d4b9a43211] rack (2.2.3) lib/rack/runtime.rb:22:in `call'
[272cb1aa-9a2a-43f9-bf40-66d4b9a43211] activesupport (6.0.3.3) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
[272cb1aa-9a2a-43f9-bf40-66d4b9a43211] actionpack (6.0.3.3) lib/action_dispatch/middleware/executor.rb:14:in `call'
[272cb1aa-9a2a-43f9-bf40-66d4b9a43211] actionpack (6.0.3.3) lib/action_dispatch/middleware/static.rb:126:in `call'
[272cb1aa-9a2a-43f9-bf40-66d4b9a43211] rack (2.2.3) lib/rack/sendfile.rb:110:in `call'
[272cb1aa-9a2a-43f9-bf40-66d4b9a43211] actionpack (6.0.3.3) lib/action_dispatch/middleware/host_authorization.rb:82:in `call'
[272cb1aa-9a2a-43f9-bf40-66d4b9a43211] railties (6.0.3.3) lib/rails/engine.rb:527:in `call'
[272cb1aa-9a2a-43f9-bf40-66d4b9a43211] puma (4.3.6) lib/puma/configuration.rb:228:in `call'
[272cb1aa-9a2a-43f9-bf40-66d4b9a43211] puma (4.3.6) lib/puma/server.rb:713:in `handle_request'
[272cb1aa-9a2a-43f9-bf40-66d4b9a43211] puma (4.3.6) lib/puma/server.rb:472:in `process_client'
[272cb1aa-9a2a-43f9-bf40-66d4b9a43211] puma (4.3.6) lib/puma/server.rb:328:in `block in run'
[272cb1aa-9a2a-43f9-bf40-66d4b9a43211] puma (4.3.6) lib/puma/thread_pool.rb:134:in `block in spawn_thread'
I have verified the static content is presenting by testing /robots.txt and this downloads as expected.

The short answer is, the following smoke-test image only renders in development
I progressed one more step on the tutorial, with the key being a genuine route and once installed in the production container, it rendered the same as Development.
Rails.application.routes.draw do
get 'welcome/index'
root 'welcome#index'
end
I can now start my development journey.

Related

Rails application does not automatically update changes in CSS

I have a Rails 6.0.3.4 application. If i make a change to CSS and refresh the browser, the change is not shown. Changes to CSS only work when i delete the rails temp folder using:
$ rails tmp:clear
I am currently using rubymine. Every other project works perfectly except this specific project.
This is my Gemfile:
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem 'rails', '6.0.3.4'
gem 'image_processing', '1.9.3'
gem 'mini_magick', '4.9.5'
gem 'active_storage_validations', '0.8.9'
gem 'bcrypt', '3.1.13'
gem 'faker', '2.11.0'
gem 'will_paginate', '3.3.0'
gem 'bootstrap-will_paginate', '1.0.0'
gem 'bootstrap-sass', '3.4.1'
gem 'puma', '4.3.5'
gem 'sass-rails', '6.0.0'
gem 'webpacker', '4.2.2'
gem 'turbolinks', '5.2.1'
gem 'jbuilder', '2.10.0'
gem 'bootsnap', '1.4.6', require: false
gem 'pg', '1.2.3'
group :development, :test do
gem 'byebug', '11.1.3', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
gem 'web-console', '4.0.2'
gem 'listen', '3.2.1'
gem 'spring', '2.1.1'
gem 'spring-watcher-listen', '2.0.1'
end
group :test do
gem 'capybara', '3.32.2'
gem 'selenium-webdriver', '3.142.7'
gem 'webdrivers', '4.3.0'
gem 'rails-controller-testing', '1.0.4'
gem 'minitest', '5.11.3'
gem 'minitest-reporters', '1.3.8'
gem 'guard', '2.16.2'
gem 'guard-minitest', '2.4.6'
end
group :production do
gem 'pg', '1.2.3'
gem 'aws-sdk-s3', '1.46.0', require: false
end
This is my Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
actioncable (6.0.3.4)
actionpack (= 6.0.3.4)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.0.3.4)
actionpack (= 6.0.3.4)
activejob (= 6.0.3.4)
activerecord (= 6.0.3.4)
activestorage (= 6.0.3.4)
activesupport (= 6.0.3.4)
mail (>= 2.7.1)
actionmailer (6.0.3.4)
actionpack (= 6.0.3.4)
actionview (= 6.0.3.4)
activejob (= 6.0.3.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.0.3.4)
actionview (= 6.0.3.4)
activesupport (= 6.0.3.4)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.0.3.4)
actionpack (= 6.0.3.4)
activerecord (= 6.0.3.4)
activestorage (= 6.0.3.4)
activesupport (= 6.0.3.4)
nokogiri (>= 1.8.5)
actionview (6.0.3.4)
activesupport (= 6.0.3.4)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
active_storage_validations (0.8.9)
rails (>= 5.2.0)
activejob (6.0.3.4)
activesupport (= 6.0.3.4)
globalid (>= 0.3.6)
activemodel (6.0.3.4)
activesupport (= 6.0.3.4)
activerecord (6.0.3.4)
activemodel (= 6.0.3.4)
activesupport (= 6.0.3.4)
activestorage (6.0.3.4)
actionpack (= 6.0.3.4)
activejob (= 6.0.3.4)
activerecord (= 6.0.3.4)
marcel (~> 0.3.1)
activesupport (6.0.3.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2, >= 2.2.2)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
ansi (1.5.0)
autoprefixer-rails (10.0.3.0)
execjs
aws-eventstream (1.1.0)
aws-partitions (1.402.0)
aws-sdk-core (3.110.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.39.0)
aws-sdk-core (~> 3, >= 3.109.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.46.0)
aws-sdk-core (~> 3, >= 3.61.1)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.2.2)
aws-eventstream (~> 1, >= 1.0.2)
bcrypt (3.1.13)
bindex (0.8.1)
bootsnap (1.4.6)
msgpack (~> 1.0)
bootstrap-sass (3.4.1)
autoprefixer-rails (>= 5.2.1)
sassc (>= 2.0.0)
bootstrap-will_paginate (1.0.0)
will_paginate
builder (3.2.4)
byebug (11.1.3)
capybara (3.32.2)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (~> 1.5)
xpath (~> 3.2)
childprocess (3.0.0)
coderay (1.1.3)
concurrent-ruby (1.1.7)
crass (1.0.6)
erubi (1.10.0)
execjs (2.7.0)
faker (2.11.0)
i18n (>= 1.6, < 2)
ffi (1.13.1)
formatador (0.2.5)
globalid (0.4.2)
activesupport (>= 4.2.0)
guard (2.16.2)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
lumberjack (>= 1.0.12, < 2.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.9.12)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-minitest (2.4.6)
guard-compat (~> 1.2)
minitest (>= 3.0)
i18n (1.8.5)
concurrent-ruby (~> 1.0)
image_processing (1.9.3)
mini_magick (>= 4.9.5, < 5)
ruby-vips (>= 2.0.13, < 3)
jbuilder (2.10.0)
activesupport (>= 5.0.0)
jmespath (1.4.0)
listen (3.2.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
loofah (2.8.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
lumberjack (1.2.8)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (0.3.3)
mimemagic (~> 0.3.2)
method_source (1.0.0)
mimemagic (0.3.5)
mini_magick (4.9.5)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.11.3)
minitest-reporters (1.3.8)
ansi
builder
minitest (>= 5.0)
ruby-progressbar
msgpack (1.3.3)
nenv (0.3.0)
nio4r (2.5.4)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
notiffany (0.1.3)
nenv (~> 0.1)
shellany (~> 0.0)
pg (1.2.3)
pry (0.13.1)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.6)
puma (4.3.5)
nio4r (~> 2.0)
rack (2.2.3)
rack-proxy (0.6.5)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (6.0.3.4)
actioncable (= 6.0.3.4)
actionmailbox (= 6.0.3.4)
actionmailer (= 6.0.3.4)
actionpack (= 6.0.3.4)
actiontext (= 6.0.3.4)
actionview (= 6.0.3.4)
activejob (= 6.0.3.4)
activemodel (= 6.0.3.4)
activerecord (= 6.0.3.4)
activestorage (= 6.0.3.4)
activesupport (= 6.0.3.4)
bundler (>= 1.3.0)
railties (= 6.0.3.4)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.4)
actionpack (>= 5.0.1.x)
actionview (>= 5.0.1.x)
activesupport (>= 5.0.1.x)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
railties (6.0.3.4)
actionpack (= 6.0.3.4)
activesupport (= 6.0.3.4)
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
rake (13.0.1)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
regexp_parser (1.8.2)
ruby-progressbar (1.10.1)
ruby-vips (2.0.17)
ffi (~> 1.9)
rubyzip (2.3.0)
sass-rails (6.0.0)
sassc-rails (~> 2.1, >= 2.1.1)
sassc (2.4.0)
ffi (~> 1.9)
sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
sprockets (> 3.0)
sprockets-rails
tilt
selenium-webdriver (3.142.7)
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
shellany (0.0.1)
spring (2.1.1)
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0)
sprockets (4.0.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.2)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
thor (1.0.1)
thread_safe (0.3.6)
tilt (2.0.10)
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (1.2.8)
thread_safe (~> 0.1)
web-console (4.0.2)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webdrivers (4.3.0)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (>= 3.0, < 4.0)
webpacker (4.2.2)
activesupport (>= 4.2)
rack-proxy (>= 0.6.1)
railties (>= 4.2)
websocket-driver (0.7.3)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
will_paginate (3.3.0)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.4.2)
PLATFORMS
ruby
DEPENDENCIES
active_storage_validations (= 0.8.9)
aws-sdk-s3 (= 1.46.0)
bcrypt (= 3.1.13)
bootsnap (= 1.4.6)
bootstrap-sass (= 3.4.1)
bootstrap-will_paginate (= 1.0.0)
byebug (= 11.1.3)
capybara (= 3.32.2)
faker (= 2.11.0)
guard (= 2.16.2)
guard-minitest (= 2.4.6)
image_processing (= 1.9.3)
jbuilder (= 2.10.0)
listen (= 3.2.1)
mini_magick (= 4.9.5)
minitest (= 5.11.3)
minitest-reporters (= 1.3.8)
pg (= 1.2.3)
puma (= 4.3.5)
rails (= 6.0.3.4)
rails-controller-testing (= 1.0.4)
sass-rails (= 6.0.0)
selenium-webdriver (= 3.142.7)
spring (= 2.1.1)
spring-watcher-listen (= 2.0.1)
turbolinks (= 5.2.1)
web-console (= 4.0.2)
webdrivers (= 4.3.0)
webpacker (= 4.2.2)
will_paginate (= 3.3.0)
BUNDLED WITH
2.1.4
#app/config/enviroments/development.rb
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
# Do not eager load code on boot.
config.eager_load = false
# Show full error reports.
config.consider_all_requests_local = true
# Enable/disable caching. By default caching is disabled.
# Run rails dev:cache to toggle caching.
if Rails.root.join('tmp', 'caching-dev.txt').exist?
config.action_controller.perform_caching = true
config.action_controller.enable_fragment_cache_logging = true
config.cache_store = :memory_store
config.public_file_server.headers = {
'Cache-Control' => "public, max-age=#{2.days.to_i}"
}
else
config.action_controller.perform_caching = false
config.cache_store = :null_store
end
# Store uploaded files on the local file system (see config/storage.yml for options).
config.active_storage.service = :local
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false
# Use this if developing on localhost.
host = 'localhost:3000'
config.action_mailer.default_url_options = { host: host, protocol: 'http' }
config.action_mailer.perform_caching = false
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
# Raise an error on page load if there are pending migrations.
config.active_record.migration_error = :page_load
# Highlight code that triggered database queries in logs.
config.active_record.verbose_query_logs = true
# Debug mode disables concatenation and preprocessing of assets.
# This option may cause significant delays in view rendering with a large
# number of complex assets.
config.assets.debug = true
# Suppress logger output for asset requests.
config.assets.quiet = true
# Raises error for missing translations.
# config.action_view.raise_on_missing_translations = true
# Use an evented file watcher to asynchronously detect changes in source code,
# routes, locales, etc. This feature depends on the listen gem.
config.file_watcher = ActiveSupport::FileUpdateChecker
end
This is the structure of my stylesheets
├── abstracts
│   ├── _function.scss
│   ├── _mixins.scss
│   └── _variables.scss
├── application.css
├── base
│   ├── _reset.scss
│   ├── _typography.scss
│   └── _utilities.scss
├── components
│   ├── _aside.scss
│   ├── _debug-info.scss
│   ├── _forms.scss
│   ├── _microposts.scss
│   └── _stats.scss
├── custom.scss
├── layouts
│   ├── _aside.scss
│   ├── _footer.scss
│   └── _header.scss
├── main.scss
└── page
├── account_activations.scss
├── microposts.scss
├── password_resets.scss
├── sessions.scss
├── static_pages.scss
└── users.scss
And this is my applicaiton.css
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
* vendor/assets/stylesheets directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
* files in this directory. Styles in this file should be added after the last require_* statement.
* It is generally better to create a new file per style scope.
*
* require_tree .
*= require_self
*= require main
*/
Rails 4.2 added Spring, which keeps the application in memory when you terminate it (to speed up start times), and Rails 5.2 added Bootsnap, which caches optimised code.
I'm using Rails 6.0.3.3 and trad css, and I see css changes applied immediately. Since you're using scss, I'd guess bootsnap is keeping compiled code hanging around.
Try rm -rf tmp/cache/bootsnap-*. Still a pain, but it'll let you know if Bootsnap's the cause.

Adding fonts to rails

I'm trying to add a custom font to rails and no matter what I do it doesn't seem to work, I've read a few other questions on github about this issue but I cant get it to work for myself.
I have put the font file into
app/assets/fonts
the name of the file is called "above.tff" and I have declared it in my CSS like this
#font-face {
font-family: 'above';
src: url(/assets/above.tff) format('truetype');
}
Which is how the top answer in this question says to do so Official way of adding custom fonts to Rails 4?
And then I apply it to the element using
font-family: 'above';
And it doesn't work and I get this error on my console.
ActionController::RoutingError (No route matches [GET] "/assets/above.tff"):
actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call'
web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app'
web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call'
web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch'
web-console (3.5.1) lib/web_console/middleware.rb:18:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app'
railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call'
activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged'
activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged'
railties (5.1.4) lib/rails/rack/logger.rb:24:in `call'
sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:11:in `block in call'
activesupport (5.1.4) lib/active_support/logger_silence.rb:20:in `silence'
activesupport (5.1.4) lib/active_support/logger.rb:63:in `block (3 levels) in broadcast'
activesupport (5.1.4) lib/active_support/logger_silence.rb:20:in `silence'
activesupport (5.1.4) lib/active_support/logger.rb:61:in `block (2 levels) in broadcast'
sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:11:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call'
rack (2.0.3) lib/rack/method_override.rb:22:in `call'
rack (2.0.3) lib/rack/runtime.rb:22:in `call'
activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call'
rack (2.0.3) lib/rack/sendfile.rb:111:in `call'
railties (5.1.4) lib/rails/engine.rb:522:in `call'
puma (3.11.0) lib/puma/configuration.rb:225:in `call'
puma (3.11.0) lib/puma/server.rb:624:in `handle_request'
puma (3.11.0) lib/puma/server.rb:438:in `process_client'
puma (3.11.0) lib/puma/server.rb:302:in `block in run'
puma (3.11.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread'
Try this font-url method is available which correctly routes and checks the assets/fonts directory
#font-face {
font-family: 'above';
src: font-url('above.tff') format('truetype');
}
A couple of things,
I really doubt the filename would be above.tff haven't see tff extension for fonts before, could be a typo, but i think it should be ttf
after changing to the above code, rename your css file to have an extension of scss

uninitialized constant Sprockets::SassCacheStore Error on Windows (Learn ruby on rails book)

I'm new to web development and I have been following the Learn ruby on rails tutorial by David Kehoe on a Windows machine. For the past couple of days I have been stuck on the same error and I have tried almost all possible solutions I can find on the internet.
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><%= content_for?(:title) ? yield(:title) : "Learn Rails" %></title>
<meta name="description" content="<%= content_for?(:description) ? yield(:description) : "Learn Rails" %>">
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
<%# Modernizr is required for Zurb Foundation %>
<%= javascript_include_tag 'vendor/modernizr' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
<%= csrf_meta_tags %>
</head>
The problem is with the line:
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
I already have NodeJs installed and I dont think the problem is with any of the javascript files because it works without the css if I take out that line. I have also tried removing require tree which didn't help.
This is my Gemfile:
source 'https://rubygems.org'
ruby '2.1.5'
gem 'rails', '4.2.2'
gem 'sqlite3'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
group :development, :test do
gem 'byebug'
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]
# learn-rails
gem 'activerecord-tableless'
gem 'compass-rails', '~> 2.0.alpha.0'
gem 'figaro'
gem 'gibbon'
gem 'google_drive'
gem 'high_voltage'
gem 'simple_form'
gem 'zurb-foundation'
group :development do
gem 'better_errors'
gem 'quiet_assets'
gem 'rails_layout'
end
And application.css.scss:
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any styles
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
* file per style scope.
*
*= require_tree .
*= require_self
*/
Is there anyone else who has had this problem and found a solution?
This is the stack trace for the current error. For some reason it changed from wrong number of arguements (1 for 2) to (3 for 2):
ArgumentError - wrong number of arguments (3 for 2):
sprockets (3.2.0) lib/sprockets/sass_cache_store.rb:14:in `_store'
sass (3.4.15) lib/sass/cache_stores/base.rb:51:in `store'
sass (3.4.15) lib/sass/engine.rb:414:in `_to_tree'
sass (3.4.15) lib/sass/engine.rb:309:in `to_tree'
sass (3.4.15) lib/sass/engine.rb:343:in `_dependencies'
sass (3.4.15) lib/sass/engine.rb:331:in `dependencies'
compass-rails (2.0.4) lib/compass-rails/patches/sass_importer.rb:36:in `evalua
te'
tilt (1.4.1) lib/tilt/template.rb:103:in `render'
sprockets (3.2.0) lib/sprockets/legacy_tilt_processor.rb:25:in `call'
sprockets (3.2.0) lib/sprockets/processor_utils.rb:75:in `call_processor'
sprockets (3.2.0) lib/sprockets/processor_utils.rb:57:in `block in call_proces
sors'
sprockets (3.2.0) lib/sprockets/processor_utils.rb:56:in `call_processors'
sprockets (3.2.0) lib/sprockets/loader.rb:86:in `load_asset_by_uri'
sprockets (3.2.0) lib/sprockets/loader.rb:45:in `block in load'
sprockets (3.2.0) lib/sprockets/loader.rb:155:in `fetch_asset_from_dependency_
cache'
sprockets (3.2.0) lib/sprockets/loader.rb:38:in `load'
sprockets (3.2.0) lib/sprockets/cached_environment.rb:20:in `block in initiali
ze'
sprockets (3.2.0) lib/sprockets/cached_environment.rb:47:in `load'
sprockets (3.2.0) lib/sprockets/bundle.rb:23:in `block in call'
sprockets (3.2.0) lib/sprockets/utils.rb:183:in `dfs'
sprockets (3.2.0) lib/sprockets/bundle.rb:24:in `call'
sprockets (3.2.0) lib/sprockets/processor_utils.rb:75:in `call_processor'
sprockets (3.2.0) lib/sprockets/processor_utils.rb:57:in `block in call_proces
sors'
sprockets (3.2.0) lib/sprockets/processor_utils.rb:56:in `call_processors'
sprockets (3.2.0) lib/sprockets/loader.rb:86:in `load_asset_by_uri'
sprockets (3.2.0) lib/sprockets/loader.rb:45:in `block in load'
sprockets (3.2.0) lib/sprockets/loader.rb:155:in `fetch_asset_from_dependency_
cache'
sprockets (3.2.0) lib/sprockets/loader.rb:38:in `load'
sprockets (3.2.0) lib/sprockets/cached_environment.rb:20:in `block in initiali
ze'
sprockets (3.2.0) lib/sprockets/cached_environment.rb:47:in `load'
sprockets (3.2.0) lib/sprockets/base.rb:63:in `find_asset'
sprockets (3.2.0) lib/sprockets/environment.rb:30:in `find_asset'
sprockets (3.2.0) lib/sprockets/base.rb:89:in `[]'
sprockets-rails (2.3.2) lib/sprockets/rails/helper.rb:230:in `lookup_asset_for
_path'
sprockets-rails (2.3.2) lib/sprockets/rails/helper.rb:190:in `check_errors_for
'
sprockets-rails (2.3.2) lib/sprockets/rails/helper.rb:159:in `block in stylesh
eet_link_tag'
sprockets-rails (2.3.2) lib/sprockets/rails/helper.rb:158:in `stylesheet_link_
tag'
app/views/layouts/application.html.erb:7:in `_app_views_layouts_application_ht
ml_erb___453486602_48019296'
actionview (4.2.2) lib/action_view/template.rb:145:in `block in render'
activesupport (4.2.2) lib/active_support/notifications.rb:166:in `instrument'
actionview (4.2.2) lib/action_view/template.rb:333:in `instrument'
actionview (4.2.2) lib/action_view/template.rb:143:in `render'
actionview (4.2.2) lib/action_view/renderer/template_renderer.rb:66:in `render
_with_layout'
actionview (4.2.2) lib/action_view/renderer/template_renderer.rb:52:in `render
_template'
actionview (4.2.2) lib/action_view/renderer/template_renderer.rb:14:in `render
'
actionview (4.2.2) lib/action_view/renderer/renderer.rb:42:in `render_template
'
actionview (4.2.2) lib/action_view/renderer/renderer.rb:23:in `render'
actionview (4.2.2) lib/action_view/rendering.rb:100:in `_render_template'
actionpack (4.2.2) lib/action_controller/metal/streaming.rb:217:in `_render_te
mplate'
actionview (4.2.2) lib/action_view/rendering.rb:83:in `render_to_body'
actionpack (4.2.2) lib/action_controller/metal/rendering.rb:32:in `render_to_b
ody'
actionpack (4.2.2) lib/action_controller/metal/renderers.rb:37:in `render_to_b
ody'
actionpack (4.2.2) lib/abstract_controller/rendering.rb:25:in `render'
actionpack (4.2.2) lib/action_controller/metal/rendering.rb:16:in `render'
actionpack (4.2.2) lib/action_controller/metal/instrumentation.rb:44:in `block
(2 levels) in render'
activesupport (4.2.2) lib/active_support/core_ext/benchmark.rb:12:in `block in
ms'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
activesupport (4.2.2) lib/active_support/core_ext/benchmark.rb:12:in `ms'
actionpack (4.2.2) lib/action_controller/metal/instrumentation.rb:44:in `block
in render'
actionpack (4.2.2) lib/action_controller/metal/instrumentation.rb:87:in `clean
up_view_runtime'
activerecord (4.2.2) lib/active_record/railties/controller_runtime.rb:25:in `c
leanup_view_runtime'
actionpack (4.2.2) lib/action_controller/metal/instrumentation.rb:43:in `rende
r'
actionpack (4.2.2) lib/action_controller/metal/implicit_render.rb:10:in `defau
lt_render'
actionpack (4.2.2) lib/action_controller/metal/implicit_render.rb:5:in `send_a
ction'
actionpack (4.2.2) lib/abstract_controller/base.rb:198:in `process_action'
actionpack (4.2.2) lib/action_controller/metal/rendering.rb:10:in `process_act
ion'
actionpack (4.2.2) lib/abstract_controller/callbacks.rb:20:in `block in proces
s_action'
activesupport (4.2.2) lib/active_support/callbacks.rb:117:in `call'
activesupport (4.2.2) lib/active_support/callbacks.rb:555:in `block (2 levels)
in compile'
activesupport (4.2.2) lib/active_support/callbacks.rb:505:in `call'
activesupport (4.2.2) lib/active_support/callbacks.rb:92:in `_run_callbacks'
activesupport (4.2.2) lib/active_support/callbacks.rb:776:in `_run_process_act
ion_callbacks'
activesupport (4.2.2) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.2) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (4.2.2) lib/action_controller/metal/rescue.rb:29:in `process_action
'
actionpack (4.2.2) lib/action_controller/metal/instrumentation.rb:32:in `block
in process_action'
activesupport (4.2.2) lib/active_support/notifications.rb:164:in `block in ins
trument'
activesupport (4.2.2) lib/active_support/notifications/instrumenter.rb:20:in `
instrument'
activesupport (4.2.2) lib/active_support/notifications.rb:164:in `instrument'
actionpack (4.2.2) lib/action_controller/metal/instrumentation.rb:30:in `proce
ss_action'
actionpack (4.2.2) lib/action_controller/metal/params_wrapper.rb:250:in `proce
ss_action'
activerecord (4.2.2) lib/active_record/railties/controller_runtime.rb:18:in `p
rocess_action'
actionpack (4.2.2) lib/abstract_controller/base.rb:137:in `process'
actionview (4.2.2) lib/action_view/rendering.rb:30:in `process'
actionpack (4.2.2) lib/action_controller/metal.rb:196:in `dispatch'
actionpack (4.2.2) lib/action_controller/metal/rack_delegation.rb:13:in `dispa
tch'
actionpack (4.2.2) lib/action_controller/metal.rb:237:in `block in action'
actionpack (4.2.2) lib/action_dispatch/routing/route_set.rb:74:in `dispatch'
actionpack (4.2.2) lib/action_dispatch/routing/route_set.rb:43:in `serve'
actionpack (4.2.2) lib/action_dispatch/journey/router.rb:43:in `block in serve
'
actionpack (4.2.2) lib/action_dispatch/journey/router.rb:30:in `serve'
actionpack (4.2.2) lib/action_dispatch/routing/route_set.rb:819:in `call'
rack (1.6.4) lib/rack/etag.rb:24:in `call'
rack (1.6.4) lib/rack/conditionalget.rb:25:in `call'
rack (1.6.4) lib/rack/head.rb:13:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/params_parser.rb:27:in `call
'
actionpack (4.2.2) lib/action_dispatch/middleware/flash.rb:260:in `call'
rack (1.6.4) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.6.4) lib/rack/session/abstract/id.rb:220:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/cookies.rb:560:in `call'
activerecord (4.2.2) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.2.2) lib/active_record/connection_adapters/abstract/connection
_pool.rb:649:in `call'
activerecord (4.2.2) lib/active_record/migration.rb:378:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/callbacks.rb:29:in `block in
call'
activesupport (4.2.2) lib/active_support/callbacks.rb:88:in `_run_callbacks'
activesupport (4.2.2) lib/active_support/callbacks.rb:776:in `_run_call_callba
cks'
activesupport (4.2.2) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.2) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/reloader.rb:73:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
better_errors (2.1.1) lib/better_errors/middleware.rb:84:in `protected_app_cal
l'
better_errors (2.1.1) lib/better_errors/middleware.rb:79:in `better_errors_cal
l'
better_errors (2.1.1) lib/better_errors/middleware.rb:57:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `c
all'
web-console (2.1.3) lib/web_console/middleware.rb:37:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/show_exceptions.rb:30:in `ca
ll'
railties (4.2.2) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.2.2) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.2.2) lib/active_support/tagged_logging.rb:68:in `block in tag
ged'
activesupport (4.2.2) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.2.2) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.2.2) lib/rails/rack/logger.rb:20:in `call'
quiet_assets (1.1.0) lib/quiet_assets.rb:27:in `call_with_quiet_assets'
actionpack (4.2.2) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.6.4) lib/rack/methodoverride.rb:22:in `call'
rack (1.6.4) lib/rack/runtime.rb:18:in `call'
activesupport (4.2.2) lib/active_support/cache/strategy/local_cache_middleware
.rb:28:in `call'
rack (1.6.4) lib/rack/lock.rb:17:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/static.rb:113:in `call'
rack (1.6.4) lib/rack/sendfile.rb:113:in `call'
railties (4.2.2) lib/rails/engine.rb:518:in `call'
railties (4.2.2) lib/rails/application.rb:164:in `call'
rack (1.6.4) lib/rack/lock.rb:17:in `call'
rack (1.6.4) lib/rack/content_length.rb:15:in `call'
rack (1.6.4) lib/rack/handler/webrick.rb:88:in `service'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `servi
ce'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/webrick/server.rb:295:in `block in
start_thread'
You're using an old alpha release of compass, this is a known issue.
After reading this Github Issue It sounds like the working combo of gems is:
gem 'sass-rails', '~> 5.0'
gem 'compass-rails', '~> 2.0.4'
That should work.
I just hit this, and the following worked for me (as Zuru mentioned in a sub-comment - posting for easier readability).
gem "compass-rails", github: "Compass/compass-rails", branch: "master"
gem 'sprockets', '2.11.0

Why is my vagrant vvv on Windows 8 not running?

I set everything up correctly and even was able to access vvv.dev. But after I used vagrant halt at night and tried to do vagrant up in the morning, I am not able to access any of the development websites.
I am able to start the virtual server fine. This is a dump of what I see in the cmder terminal when I do vagrant up.
λ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
default: Warning: Remote connection disconnect. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Checking for host entries
==> default: adding to (C:/windows/system32/drivers/etc/hosts) : 192.168.50.4 vvv # VAGRANT: d40ca6129049f2b46ad0834feb482d92 (default) / ccbbf797-c9b1-49d1-a887-a4d8caec2676
==> default: adding to (C:/windows/system32/drivers/etc/hosts) : 192.168.50.4 vvv.dev # VAGRANT: d40ca6129049f2b46ad0834feb482d92 (default) / ccbbf797-c9b1-49d1-a887-a4d8caec2676
==> default: adding to (C:/windows/system32/drivers/etc/hosts) : 192.168.50.4 local.wordpress.dev # VAGRANT: d40ca6129049f2b46ad0834feb482d92 (default) / ccbbf797-c9b1-49d1-a887-a4d8caec2676
==> default: adding to (C:/windows/system32/drivers/etc/hosts) : 192.168.50.4 local.wordpress-trunk.dev # VAGRANT: d40ca6129049f2b46ad0834feb482d92 (default) / ccbbf797-c9b1-49d1-a887-a4d8caec2676
==> default: adding to (C:/windows/system32/drivers/etc/hosts) : 192.168.50.4 src.wordpress-develop.dev # VAGRANT: d40ca6129049f2b46ad0834feb482d92 (default) / ccbbf797-c9b1-49d1-a887-a4d8caec2676
==> default: adding to (C:/windows/system32/drivers/etc/hosts) : 192.168.50.4 build.wordpress-develop.dev # VAGRANT: d40ca6129049f2b46ad0834feb482d92 (default) / ccbbf797-c9b1-49d1-a887-a4d8caec2676
==> default: adding to (C:/windows/system32/drivers/etc/hosts) : 192.168.50.4 192.168.50.4 local.wordpress.dev local.wordpress-trunk.dev # VAGRANT: d40ca6129049f2b46ad0834feb482d92 (default) / ccbbf797-c9b1-49d1-a887-a4d8caec2676
C:/Users/hola/.vagrant.d/gems/gems/vagrant-hostsupdater-0.0.11/lib/vagrant-hostsupdater/HostsUpdater.rb:82:in `initialize': Permission denied - C:/windows/system32/drivers/etc/hosts (Errno::EACCES)
from C:/Users/hola/.vagrant.d/gems/gems/vagrant-hostsupdater-0.0.11/lib/vagrant-hostsupdater/HostsUpdater.rb:82:in `open'
from C:/Users/hola/.vagrant.d/gems/gems/vagrant-hostsupdater-0.0.11/lib/vagrant-hostsupdater/HostsUpdater.rb:82:in `addToHosts'
from C:/Users/hola/.vagrant.d/gems/gems/vagrant-hostsupdater-0.0.11/lib/vagrant-hostsupdater/HostsUpdater.rb:42:in `addHostEntries'
from C:/Users/hola/.vagrant.d/gems/gems/vagrant-hostsupdater-0.0.11/lib/vagrant-hostsupdater/Action/UpdateHosts.rb:18:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/virtualbox/action/check_guest_additions.rb:49:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/virtualbox/action/customize.rb:40:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/wait_for_communicator.rb:71:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/virtualbox/action/customize.rb:40:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/virtualbox/action/boot.rb:18:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/virtualbox/action/customize.rb:40:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/virtualbox/action/sane_defaults.rb:38:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/set_hostname.rb:16:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/virtualbox/action/forward_ports.rb:31:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/virtualbox/action/network.rb:121:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/virtualbox/action/clear_network_interfaces.rb:26:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/virtualbox/action/prepare_nfs_settings.rb:18:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/synced_folders.rb:84:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/synced_folder_cleanup.rb:28:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/synced_folders/nfs/action_cleanup.rb:19:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/virtualbox/action/prepare_nfs_valid_ids.rb:12:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:160:in `handle'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:42:in `block in call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:516:in `lock'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:41:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/virtualbox/action/prepare_forwarded_port_collision_params.rb:30:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/env_set.rb:19:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/provision.rb:80:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/virtualbox/action/clear_forwarded_ports.rb:15:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/virtualbox/action/set_name.rb:19:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/virtualbox/action/clean_machine_folder.rb:17:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builder.rb:116:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:in `block in run'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/util/busy.rb:19:in `busy'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:in `run'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/call.rb:53:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builder.rb:116:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:in `block in run'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/util/busy.rb:19:in `busy'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:in `run'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/call.rb:53:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builder.rb:116:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:in `block in run'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/util/busy.rb:19:in `busy'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:in `run'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/call.rb:53:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/box_check_outdated.rb:68:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builder.rb:116:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:in `block in run'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/util/busy.rb:19:in `busy'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:in `run'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/call.rb:53:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builder.rb:116:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:in `block in run'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/util/busy.rb:19:in `busy'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:in `run'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/call.rb:53:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builder.rb:116:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:in `block in run'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/util/busy.rb:19:in `busy'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:in `run'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/machine.rb:214:in `action_raw'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/machine.rb:191:in `block in action'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:516:in `lock'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/machine.rb:178:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/machine.rb:178:in `action'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
To the best of my (very limited) knowledge, every time you halt Vagrant it removes all of it's entries in the hosts file. Simply, on windows Vagrant needs an elevated terminal so it can edit the hosts file.
If you didn't run your terminal as an administrator, try that first - hope that works!

Rails 4 fails on sqlite3

I get this error when I run a new empty rails (4.0) site:
Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 'sqlite3'` to your Gemfile.
I have a valid sqlite3 gem built with the devkit. I made a dumb test for that:
w:...> ruby hello.rb
hello world
test.db is done.
Which also creates an empty database, called "test.db" as shown below. Simple ruby script:
require "sqlite3"
puts "hello world"
# Open a database
db = SQLite3::Database.new "test.db"
puts "test.db is done."
My conclusion is that the sqlite3 gem is working OK and that there's something amiss inside rails some place. Suggestions or explanations welcome.
Bit of an update following the comment about Gemfile:
# Use sqlite3 as the database for Active Record
gem 'sqlite3', group: [:development, :test]
In addition, I used the bundle show command, and I find this strange:
w:...> bundle show sqlite3
Could not find gem 'sqlite3'.
Did you mean sqlite3?
When I do a bundle install the output list does not include sqlite3. I should add the Gemfile and everything else was generated right out of the box by a "rails new train" command (project name, 'train' of course).
Environment is an install of Ruby v2, Rails v4 on Windows 7 64-bit PC. I have PIK to manage different versions of ruby. Suggestions welcome, thanks in advance, Will.
Everything is/should be fresh-out-of-the-box Rails 4/Ruby 2 configuration. I'm adding the server's stack dump also, since in theory a fresh install should be working.
Gem::LoadError (Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 'sqlite3'` to your Gemfile.):
activerecord (4.0.0) lib/active_record/connection_adapters/connection_specification.rb:58:in `rescue in resolve_hash_connection'
activerecord (4.0.0) lib/active_record/connection_adapters/connection_specification.rb:55:in `resolve_hash_connection'
activerecord (4.0.0) lib/active_record/connection_adapters/connection_specification.rb:46:in `resolve_string_connection'
activerecord (4.0.0) lib/active_record/connection_adapters/connection_specification.rb:30:in `spec'
activerecord (4.0.0) lib/active_record/connection_handling.rb:39:in `establish_connection'
activerecord (4.0.0) lib/active_record/railtie.rb:175:in `block (2 levels) in <class:Railtie>'
activesupport (4.0.0) lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
activesupport (4.0.0) lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
activesupport (4.0.0) lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
activesupport (4.0.0) lib/active_support/lazy_load_hooks.rb:44:in `each'
activesupport (4.0.0) lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
activerecord (4.0.0) lib/active_record/base.rb:322:in `<module:ActiveRecord>'
activerecord (4.0.0) lib/active_record/base.rb:22:in `<top (required)>'
activerecord (4.0.0) lib/active_record/query_cache.rb:50:in `restore_query_cache_settings'
activerecord (4.0.0) lib/active_record/query_cache.rb:43:in `rescue in call'
activerecord (4.0.0) lib/active_record/query_cache.rb:32:in `call'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'
activerecord (4.0.0) lib/active_record/migration.rb:369:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.0.0) lib/active_support/callbacks.rb:373:in `_run__398267657__call__callbacks'
activesupport (4.0.0) lib/active_support/callbacks.rb:80:in `run_callbacks'
actionpack (4.0.0) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/reloader.rb:64:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.0.0) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.0.0) lib/rails/rack/logger.rb:21:in `block in call'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `block in tagged'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:25:in `tagged'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `tagged'
railties (4.0.0) lib/rails/rack/logger.rb:21:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
activesupport (4.0.0) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/static.rb:64:in `call'
railties (4.0.0) lib/rails/engine.rb:511:in `call'
railties (4.0.0) lib/rails/application.rb:97:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
rack (1.5.2) lib/rack/content_length.rb:14:in `call'
rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
B:/lang/ruby/v02.00/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
B:/lang/ruby/v02.00/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
B:/lang/ruby/v02.00/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
Two bits of news to report. I was passed an explanation for this on the PIK mailing list:
[Luis Lavena] You don't indicate which version of Ruby 2.0 are you using (the exact output of "ruby -v"), but I will assume is x64 bit, correct?
If that is the case, then you're affected by a bug in Bundler. The same was reported here:
https://github.com/sparklemotion/sqlite3-ruby/issues/109
Yes, the problem is happening with Ruby v2 64-bit
w:...> ruby -v
ruby 2.0.0p195 (2013-05-14) [x64-mingw32]
w:...> bundle -v
Bundler version 1.3.5
Reading the sparklemotion post the error lies with Bundler. To be fathomed I guess.
On the plus side. I used Rails 4 with Ruby 2 to make the rails project and can run the server to use SQLite3 using JRuby by changing the Gemfile to use the jdbc driver, as shown:
# Use sqlite3 as the database for Active Record
group :development, :test do
# gem 'sqlite3'
gem 'activerecord-jdbc-adapter'
gem 'jdbc-sqlite3'
end
It almost looks like Bundler has a thing against SQLite3 doesn't it?
One last thing. The Sqlite3 gem build OK with Ruby v2 and works, as demonstrated with my toy test program. Since it is just a Gem ... the Bundler problem may pop-up for some other gems -- Be alert, probably best to upgrade as soon as you see the problem:
w:...> ruby -S gem update bundler --prerelease
Updating installed gems
Updating bundler
Fetching: bundler-1.4.0.rc.1.gem (100%)
Successfully installed bundler-1.4.0.rc.1
Parsing documentation for bundler-1.4.0.rc.1
Installing ri documentation for bundler-1.4.0.rc.1
Installing darkfish documentation for bundler-1.4.0.rc.1
Done installing documentation for bundler after 9 seconds
Gems updated: bundler
Just check the list
w:...> bundle list
Gems included by the bundle:
:
* sprockets (2.10.0)
* sprockets-rails (2.0.1)
* sqlite3 (1.3.8)
* thor (0.18.1)
:
Works a treat!
:-)
Dou you have:
gem 'sqlite3'
or something like this
gem 'sqlite3', group: [:development, :test]
in your Gemfile?

Resources