-
Notifications
You must be signed in to change notification settings - Fork 242
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
Missing CoffeeScript dependency? #405
Comments
Thanks for the issue. Can I ask why you're precompiling assets in the dev environment? |
worth looking into -- not sure why coffee_script would be needed -- I think it's specifically optional? |
@mikepack that is a very good question... I don't really have an answer, it was just a surprise. I imagine those
|
Thanks again for the issue Ben. Sadly, I'm not able to reproduce. Closing for now, but happy to keep digging. Here're my steps:
|
Clearing the cache fixed it for me. rails/sprockets#183 (comment) |
I'm having the very same issue.
The issue occurs with sprockets-rails |
Not sure if the rake task is env-specific, but if it is, maybe it will help to throw in |
The I can get it fixed only by: To me it looks like |
I'm getting this issue too. I have teaspoon in both my dev and test environments (so I can access the rails generators). It seems to occur because sprockets is trying to process |
@mikepack I'm afraid Rails includes coffee script in the gemfile by default (both via coffee-script rails and tubolinks), so you need to remove these from the default app that rails generates. I can reliably reproduce by using the following:
Could you please try looking into this again? |
To me it looks like |
Should the published version of teaspoon have a dependency on coffee script? Couldn't those files be precompiled in the published version of the gem? |
Sounds like maybe we missed a file in precompilation. Knowing that we can figure it out and get a new release.
|
@jejacks0n By my own debugging that might be |
It was, and thanks. :) Jeremy Jackson
|
Adding gem |
I found I only needed to add Why is this issue closed? Seems to still be an issue that needs to be resolved. |
I just ran into this also. I think this issue should be re-opened until there is a version of the gem that has coffee-script as a requirement. |
Just installed |
Had an asset compilation issue jejacks0n/teaspoon#405
We don't need (or intend to use) coffee script in the app itself, however our teaspoon JS test runner has a coffee script asset that sprockets-rails 3.2 tries to compile and will fail if coffee-rails is not present. This issue on the teaspoon repo describes the problem: jejacks0n/teaspoon#405 It's marked as closed, but no released version actually has a fix.
@mikepack The reason your test couldn't reproduce this is that a default scaffolded Rails app includes Here's a test that can reproduce this: #!/bin/sh
set -e
APP=${1:-teaspoon-without-coffee}
set -x
rails new "$APP" --skip-spring --skip-coffee
cd "$APP"
bundle add --group development,test teaspoon-jasmine
bundle exec rails generate teaspoon:install
echo 'describe("Coffee failure", function() { it("fails"); })' > spec/javascripts/coffee_failure_spec.js
bundle exec rake teaspoon Here's the output:
|
I'm running into this issue as well. In fact, just adding teaspoon-jasmine to the gemfile and running bundle install causes the precompilation task to fail. |
clearly, clearing your cache does not fix the issue. |
I've opened #528 to fix this. |
You only need to include coffee-rails in your assets group if you're using Sprockets 3+; it may be a better idea to add it to a development/test group if you aren't using CoffeeScript in your app. It's probably a good idea to add this information to the README, in the Installation section. |
I've proposed an alternate fix at #536 I believe the issue is that |
This was no longer running properly due to a strange `coffee_rails` dependency. More information here: jejacks0n/teaspoon#405 WORKAREA-185
This was no longer running properly due to a strange `coffee_rails` dependency. More information here: jejacks0n/teaspoon#405 WORKAREA-185
This was no longer running properly due to a strange `coffee_rails` dependency. More information here: jejacks0n/teaspoon#405 WORKAREA-185
This was no longer running properly due to a strange `coffee_rails` dependency. More information here: jejacks0n/teaspoon#405 WORKAREA-185
Problem
In Rails
rake assets:precompile
blows up withLoadError: cannot load such file -- coffee_script
in development/test environments.Steps to reproduce
rake assets:precompile
- it works!gem 'teaspoon', groups: [:development, :test]
.rake assets:precompile
- it does not work 😦This is with Rails 4.2.4 and Teaspoon 1.0.2.
The text was updated successfully, but these errors were encountered: