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

Rails 6.1 - application.coffee does not appear to exist #301

Open
wanchic opened this issue Feb 22, 2021 · 1 comment
Open

Rails 6.1 - application.coffee does not appear to exist #301

wanchic opened this issue Feb 22, 2021 · 1 comment

Comments

@wanchic
Copy link

wanchic commented Feb 22, 2021

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

@webdev36
Copy link

I think it is not fixed on the rails 6.x project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants