Description
Welcome! Getting set up can be tough, but if we work together, we can get past many of the common roadblocks that first-time contributors encounter! 🎉
👀 See this page to get started: https://github.com/publiclab/plots2#installation
🖥 If you have a Windows machine, see: https://gorails.com/setup/windows/10
☁️ Or consider using Codenvy at https://codenvy.io (no invite required!)
🤝 Share the issues you encounter along the way and help others solve theirs. 💬 Chime in below in a comment to cooperate with others who are also
working on this task.
✋ Report back at the above issue once you succeed, to encourage others and share what worked for you!
Noting that due to recent install of webpacker
there's an extra step needed, apologies if this has caused you trouble!
For now, you have to create a manifest.js
file, following the steps shown here: https://stackoverflow.com/questions/58339607/why-does-rails-fails-to-boot-with-expected-to-find-a-manifest-file-in-app-asse#answer-58370129:~:text=Easy%20Steps%20To%20Solve%20the%20Problem%3A
The error you may see for which this is the solution is:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/Users/jeff/.gem/ruby/2.6.6/gems/mimemagic-0.3.8/ext/mimemagic
/Users/jeff/.rubies/ruby-2.6.6/bin/ruby -rrubygems
/Users/jeff/.gem/ruby/2.6.6/gems/rake-13.0.3/exe/rake
RUBYARCHDIR\=/Users/jeff/.gem/ruby/2.6.6/extensions/x86_64-darwin-20/2.6.0-static/mimemagic-0.3.8
RUBYLIBDIR\=/Users/jeff/.gem/ruby/2.6.6/extensions/x86_64-darwin-20/2.6.0-static/mimemagic-0.3.8
rake aborted!
Could not find MIME type database in the following locations:
["/usr/local/share/mime/packages/freedesktop.org.xml",
The steps are:
This error comes up because you don't have a
manifest.js
created. You need to create one, and add in a few lines to make sure things are working. In the old version of sprockets, they made big assumptions about which assets sprockets is taking care of (i.e. bundling and concatenating). Not anymore. Now you have to tell sprockets explicitly, what files you want taken care of: and you do this in yourmanifest.js
file.
Create the
manifest.js
file
$ mkdir -p app/assets/config
$ touch app/assets/config/manifest.js (not the root rails directory)
Then copy and paste the following into the manifest.js file you just created:
//= link_tree ../images
//= link_directory ../javascripts .js
//= link_directory ../stylesheets .css
If you have a precompile array in your app/config/
folder (see below for an example) e.g. app/config/production.rb
then perhaps you should move them over to your manifest.js
if they are not already accessed above.
config.assets.precompile = ["admin.js", "admin.css"]
Lastly, if you are using webpacker, you might want to decide what you want handled by the asset pipeline and what you want handled by webpacker. i.e. remove the link_directory to the javascripts file according to your own particular use cases.
(added by @jywarren)