-
-
Notifications
You must be signed in to change notification settings - Fork 537
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
Precompiling assets fails, could not find bootstrap-sprockets #3065
Comments
I'm hitting the exact same issue with a very similar install process. Although there are a few differences:
None of those should make any material difference (if anything they rule out some possible issues). I've retried a number of times and it's constantly reproducible. I've checked and/or tested everything I could find online that seemed relevant and no joy. However, on one occasion mucking around with updating dependencies I did get past the "Sprockets::FileNotFound: couldn't find file 'bootstrap-sprockets'" and it seemed to be ok (although I didn't actually test the UI in a browser). Unfortunately I'm not 100% what I did to "fix" it. I did take notes of what I did (reinstalled I did notice that there have been a few commits to master (v2.7.1...master) but none of them seem relevant (although perhaps worth testing just in case?). I'll try again sometime soon, but I've already spent too much time on this and need to move on... I'll post back if/when I find a fix and I'd love it if you (or anyone else) did the same. 😁 |
I'm not sure if it's at all relevant, but I neglected to mention that I have both Nodejs and yarn preinstalled. Node v18.x is installed from Debian apt repo and yarn v1.22.x installed via upstream apt repo. |
Hi guys,
So i modified the Gemfile, putting bootstrap-sass not only in the :assets group, but also above (where i think the "production" group resides, implicitly. (remember: i hadn't contact with rails since more than a decade ;-)): tracks@v31281:~/tracks$ git diff Gemfile
diff --git a/Gemfile b/Gemfile
index 02189990..459fd657 100644
--- a/Gemfile
+++ b/Gemfile
@@ -8,6 +8,7 @@ gem 'rails', '~> 6.1'
gem 'font-awesome-sass', '~> 6.5.2'
gem 'jquery-rails', '~> 4.6'
gem 'jquery-ui-rails', '~>7.0.0'
+gem 'bootstrap-sass', '3.4.1'
gem 'aasm', '~> 5.5.0'
gem 'acts_as_list'
gem 'bcrypt', '~> 3.1.20' Eh tada! Afterwards the precompilation of assets worked fine, and now i'm happily running the latest tracks version :-) Hope this helps for you, too. cheers |
Thanks @hbeck001! You're a legend! I'll give it a go and post back. |
Wonderful, that solved the issue! It was just this line. The By the way: the final step, starting Rails, also does not work as stated in the manual. Executing |
@hbeck001 - I can also confirm that your change in the
There is a TL;DR of my conclusion at the bottom for those in a rush, but here's my experience and rational for my conclusion - in "ADHD stream of consciousness" style.. 😁 After adding
Removing the other But why? Why is this an issue in the first place and why does adding or moving I've had (very) limited experience with RoR but I hate needing to do some hacky feeling workaround that I don't understand... After some hunting, I discovered that the
Digging further I found the commit and rational for that change. I can confirm that removing the
I read through some of the discussion on that Rails commit and it seems that at the time it was somewhat contentious and reading through I found another workaround for this precomplie issue:
I can confirm that that also works. IMO it feels like a "cleaner" install workaround (than manually editing the TL;DR IMO the "proper" fix for this issue is to remove the I'll open a PR to apply that change and see what @ZeiP thinks. In the meantime, I'll workaround this issue by setting |
Sorry for not being able to get back to this sooner! The problem can indeed be fixed by moving stuff around from the assets group; the group is there because the Docker build process uses it as to not include any extra dependencies in the final image. But as the assets group is not optional it should IMO be pulled with the current instructions... Weird. |
I was attempting to install the latest release 2.7.1, using the custom server installation path. I a using Ruby 3.2.0 with a MySQL database and a recent bundler. (In fact it is too new, so that the
bundle install
first installs the older version 2.4.1.)I followed the steps successfully with downloading Tracks, setting the configuration to MySQL and then populate the database using the listed command:
bundle exec rake db:migrate RAILS_ENV=production
The installation steps work until here. The next command to precompile the assets unfortunately fails.
I am not skilled in Ruby nor Rails, so I was not able to google and understand possible solutions by removing some dependencies or requirements. There are too many different languages and configuration files at work, so I cannot say what the error really means here.
The error message further reports where it looked for the missing file, followed by a call stack, which I omitted for now (if it is useful, please ask). The error originates here.
I replaced my username with a generic
username
in the paste output.All commands were executed in
/var/www/virtual/username/apps/tracks/
where the Tracks installation is located. Its contents are from the release archive.The text was updated successfully, but these errors were encountered: