foundation-rails
foundation-rails copied to clipboard
Rails 6.1 - application.coffee does not appear to exist
Rails 6.1.2.1, Ruby 2.7.2, foundation-rails (6.6.2.0), autoprefixer-rails (10.2.4.0)
Running $ rails g foundation:install
produces the following error:
The file ~/rails_project/app/assets/javascripts/application.coffee does not appear to exist
Rails 6.1 does not have a ../app/assets/javascripts/application.coffee
file anymore. I believe all javascript is recommended to be sent to ../app/javascripts/packs/application.js
, but maybe I'm wrong?
I "think" got this to work by adding the requested file: ../app/assets/javascripts/application.coffee
, and executing rails g foundation:install
once again. Once ran, the following was added to that file:
() ->
$(document).foundation()
While this seemed to get my foundation working, I'm not confident this fixed the issue. While I added the requested gems and ran $ bundle install
...:
# Foundation
gem 'foundation-rails'
gem 'autoprefixer-rails'
...during my troubleshooting process, I also installed foundation via yarn...which did not work right out of the box:
$ yarn add foundation-sites
I'm not sure how/where coffee may have also been installed. It is not found in my Gemfile.lock
nor my package.json
, nor my yarn.lock
A new process needs to be addressed for Rails 6.1.x
I think it is not fixed on the rails 6.x project.