[Setup] Work together to install plots2 on your computer
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.jscreated. 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.jsfile.
Create the
manifest.jsfile
$ 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)
Please leave comments here if you have trouble, and @publiclab/mentors and others will help each other out!
Hi, I've had smooth sailing installing plots 2, but I'm having trouble running Phusion Passenger. I've followed the standard installation procedure outlined on the readme until step 9, when I get the following error: https://pastebin.com/AaeeizLL
Here's the log file, which is quite large: https://pastebin.com/1YinJL08
Thanks for your time!
@publiclab/mentors, could you help @JonathanXu1?
Hi, @JonathanXu1 -- and thanks @milaaraujo for highlighting this.
@JonathanXu1 is it possible you're running this within Windows? I see a reference to Microsoft deep in the logs. If so, perhaps take a look at #3800 and response by @gauravano:
Ok, you can try this link - https://gorails.com/setup/windows/10 for setting up Rails on your system.
I see:
[ W 2018-10-28 18:36:06.7046 318/T1 Ser/AcceptLoadBalancer.h:295 ]: Cannot disable Nagle's algorithm on a TCP socket: Invalid argument (errno=22)
[ W 2018-10-28 18:36:06.7050 318/T1 Ser/Server.h:799 ]: [ApiServer] Cannot disable Nagle's algorithm on a TCP socket: Invalid argument (errno=22)
[ N 2018-10-28 18:36:06.7061 318/T1 age/Cor/CoreMain.cpp:985 ]: Passenger core online, PID 318
[ N 2018-10-28 18:36:09.9318 318/T5 age/Cor/SecurityUpdateChecker.h:517 ]: Security update check: no update found (next check in 24 hours)
[ E 2018-10-28 18:37:40.6930 318/Ti age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /mnt/c/users/jonathan/documents/coding/contests/codein/plots2: A timeout error occurred while spawning an application process.
Error ID: 20a9843c
Error details saved to: /tmp/passenger-error.nYzA6D
Hmm, actually i see you're in Ubuntu... this is mysterious -- i use Ubuntu myself! I tried searching for the error itself:
https://duckduckgo.com/?q=Implementation.cpp%3A221+Could+not+spawn+process+for+application+A+timeout+error+occurred+while+spawning+an+application+process.+phusion&atb=v121-6&ia=qa
I'm not sure what to try next, but if you get really stuck, email me at [email protected] and we can get you a Cloud9 invite to try on their cloud: https://aws.amazon.com/cloud9/?origin=c9io
Sorry you're having trouble!
Really sorry about not clarifying my operating system. I'm using Ubuntu on the Linux subsystem of Windows. I couldn't find a solution for my problem, so I'm going to request a Cloud9 invite. Thanks for your help!
OK, that accounts for the "Microsoft" message ... thank you! I invited you, too!
On Fri, Nov 2, 2018 at 9:23 AM Jonathan Xu [email protected] wrote:
Really sorry about not clarifying my operating system. I'm using Ubuntu on the Linux subsystem of Windows. I couldn't find a solution for my problem, so I'm going to request a Cloud9 invite. Thanks for your help!
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/3840#issuecomment-435378577, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJytPl08f8TS19A3O8VZz_xJCAn_Hks5urEcsgaJpZM4YBH8F .
Hello,
I have been trying to setup plots2, but I cannot get rails to run with the OpenSSL version I have.
I am sorry I did not come across this page earlier and I have already created an issue for the same.
Kindly refer to the issue https://github.com/publiclab/plots2/issues/3897 for details.
Sorry for the trouble, but I would really appreciate some help here.
Regards,
Shriya
Have folks using cloud9 had success?
Hi @shriyakaneriya - i'll check out your other page, thanks.
I see at least one person using Cloud9 has the error Could not find Bootstrap -- this means you haven't run yarn install to get your JavaScript dependencies. I'm going to make sure our docs reflect this, but please give yarn install a try, as it replaces the former bower install step.
Indeed, the Cloud9 instructions had not updated the bower command to yarn, and I've just made the change. In fact I believe you need to run yarn install && yarn postinstall.
Here's the change I just made:
https://github.com/publiclab/plots2/blob/1c7f7ee6baa0331e36ff870157df663d92aacd5e/install_cloudnine.sh#L11
Sorry if this was getting people stuck!!!
Also, if you are using cloudnine, once you begin, you should be able to run sh install_cloudnine.sh to begin auto-installation. I'm trying this now to be sure it works:
jywarren:~/workspace (master) $ sh install_cloudnine.sh
Enter your cloud9 username: jywarren
Warning, new version of rvm available '1.29.4', you are using older version '1.29.2'.
You can disable this warning with: echo rvm_autoupdate_flag=0 >> ~/.rvmrc
You can enable auto-update with: echo rvm_autoupdate_flag=2 >> ~/.rvmrc
Searching for binary rubies, this might take some time.
Found remote file https://rubies.travis-ci.org/ubuntu/14.04/x86_64/ruby-2.4.4.tar.bz2
Checking requirements for ubuntu.
Requirements installation successful.
ruby-2.4.4 - #configure
ruby-2.4.4 - #download
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
1 14.4M 1 254k 0 0 4864 0 0:51:48 0:00:53 0:50:55 0
Also just linked in an issue via #3914 where it looks like rake db:migrate wasn't running -- but on initial setup, you actually don't need it, just rake db:setup. Noting here for others doing this too!
The only problem I had was that I needed to modify the ruby version in Gemfile (2.5.3 for me in ArchLinux instead of 2.4.4)
rails test -d gives 2 fails for me
ah, can you paste your test failures into a Gist at https://gist.github.com so we can see? Hopefully we can help you resolve them.
On Tue, Nov 13, 2018 at 8:30 AM Cheong Sik Feng [email protected] wrote:
The only problem I had was that I needed to modify the ruby version in Gemfile (2.5.3 for me in ArchLinux instead of 2.4.4)
rails test -d gives 2 fails for me
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/3840#issuecomment-438265931, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ47du9ZQ7J8qdWz2RjJPiDe3YDAKks5uuslXgaJpZM4YBH8F .
I have put them here
https://github.com/sikfeng/plots2/tree/master/test/reports
Hi. Who can help me with Sprockets::FileNotFound in Home#home?
couldn't find file 'bootstrap/dist/css/bootstrap.min.css' with type 'text/css' Checked in these paths: /home/sparks/plots2/app/assets/images /home/sparks/plots2/app/assets/javascripts /home/sparks/plots2/app/assets/less...
Hi...
I'm getting
LoadError: Could not load the 'mongodb' Active Record adapter. Ensure that the adapter is spelled correctly in config/database.yml and that you've added the necessary adapter gem to your Gemfile.
when executing rake db:setup
I've already copied and pasted config/database.yml.sqlite.example as per instructions provided.
Here is full log : https://pastebin.com/TnjrNKAk
help!
Hi I am a GCI participant who just figured out how to set up plots2 on my local machine. It is working surprisingly well and the instructions to set it up were very clear.
Great job Public Lab!
Also just installed it for GCI. Also, the app has a surprisingly good code, so congratulations on your team for keeping the code quality on the high level.
@thesparks -- did you run yarn install before starting it up? It's saying it can't find your CSS and JS files that come from yarn installation.
@atulbi -- we haven't run this with mongodb to my knowledge, did you set up the database.yml to use mongodb? Have you tried mariadb which is a more traditional SQL database, and our default? Or tell us a bit more, maybe you're trying something new! Thanks!
Sorry i took a bit to reply to folks here! Great work collaborating on this :-)