Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asset precompile failure over environment mismatch #805

Open
ain opened this issue Nov 12, 2018 · 2 comments
Open

Asset precompile failure over environment mismatch #805

ain opened this issue Nov 12, 2018 · 2 comments

Comments

@ain
Copy link
Contributor

ain commented Nov 12, 2018

Steps to reproduce:

  1. Follow instruction to run FFCRM as Rails engine
  2. Set up Docker environment based off ruby:2.5.3 with Puma and MariaDB
  3. Import old database
  4. Run stack with docker-compose up
  5. Access http://localhost
  6. Log in

What happens: instance spins up nicely

web_1  | Puma starting in single mode...
web_1  | * Version 3.12.0 (ruby 2.5.3-p105), codename: Llamas in Pajamas
web_1  | * Min threads: 1, max threads: 1
web_1  | * Environment: development
web_1  | * Listening on tcp://0.0.0.0:3000

but logging in results in error:

Sprockets::Rails::Helper::AssetNotPrecompiled in Home#index
Showing /usr/local/bundle/gems/fat_free_crm-0.18.1/app/views/home/index.html.haml where line #36 raised:

Asset was not declared to be precompiled in production.
Add `Rails.application.config.assets.precompile += %w( loading.gif )` to `config/initializers/assets.rb` and restart your server

What should happen: since application runs in development, assets should not be expected to be precompiled. Environment is correct:

$ docker-compose exec web env
PATH=/usr/local/bundle/bin:/usr/local/bundle/gems/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=29d1f78696cd
TERM=xterm
RAILS_ENV=development
RACK_ENV=development
RUBY_MAJOR=2.5
RUBY_VERSION=2.5.3
RUBY_DOWNLOAD_SHA256=1cc9d0359a8ea35fc6111ec830d12e60168f3b9b305a3c2578357d360fcf306f
RUBYGEMS_VERSION=2.7.8
BUNDLER_VERSION=1.17.1
GEM_HOME=/usr/local/bundle
BUNDLE_PATH=/usr/local/bundle
BUNDLE_SILENCE_ROOT_WARNING=1
BUNDLE_APP_CONFIG=/usr/local/bundle
HOME=/root
@ain
Copy link
Contributor Author

ain commented Nov 12, 2018

The above happened on 0.18.1 (gem 'fat_free_crm', '~> 0.18.1')

Switching to master (gem 'fat_free_crm', :github => 'fatfreecrm/fat_free_crm') resolved the precompilation error.

@ain ain closed this as completed Nov 12, 2018
@ain
Copy link
Contributor Author

ain commented Nov 12, 2018

False alert. After running bundle exec rake db:migrate which also migrated to a Devise-based auth, login still ends up in a page with precompilation error (above).

@ain ain reopened this Nov 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants