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

[Setup] Work together to install plots2 on your computer #3840

Closed
milaaraujo opened this issue Oct 30, 2018 · 85 comments
Closed

[Setup] Work together to install plots2 on your computer #3840

milaaraujo opened this issue Oct 30, 2018 · 85 comments
Labels
installation multiple-use outreach issues involve community involvement and helping people who're stuck somewhere

Comments

@milaaraujo
Copy link
Collaborator

milaaraujo commented Oct 30, 2018

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 your manifest.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)

@jywarren
Copy link
Member

Please leave comments here if you have trouble, and @publiclab/mentors and others will help each other out!

@jonxuxu
Copy link
Member

jonxuxu commented Oct 31, 2018

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!

@milaaraujo
Copy link
Collaborator Author

@publiclab/mentors, could you help @JonathanXu1?

@jywarren
Copy link
Member

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!

@jonxuxu
Copy link
Member

jonxuxu commented Nov 2, 2018

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!

@jywarren
Copy link
Member

jywarren commented Nov 2, 2018 via email

@shriyakaneriya
Copy link

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 #3897 for details.
Sorry for the trouble, but I would really appreciate some help here.
Regards,
Shriya

@jywarren
Copy link
Member

jywarren commented Nov 6, 2018

Have folks using cloud9 had success?

Hi @shriyakaneriya - i'll check out your other page, thanks.

@jywarren
Copy link
Member

jywarren commented Nov 6, 2018

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.

@jywarren
Copy link
Member

jywarren commented Nov 6, 2018

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:

yarn install && yarn postinstall

Sorry if this was getting people stuck!!!

@jywarren
Copy link
Member

jywarren commented Nov 6, 2018

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

@jywarren jywarren changed the title Install plots2 Work together to install plots2 on your local machine Nov 6, 2018
@jywarren jywarren added outreach issues involve community involvement and helping people who're stuck somewhere multiple-use labels Nov 6, 2018
@jywarren
Copy link
Member

jywarren commented Nov 7, 2018

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!

@sikfeng
Copy link

sikfeng commented Nov 13, 2018

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

@jywarren
Copy link
Member

jywarren commented Nov 13, 2018 via email

@sikfeng
Copy link

sikfeng commented Nov 14, 2018

@tsparksh
Copy link
Member

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...

@atulbi
Copy link
Contributor

atulbi commented Nov 18, 2018

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!

@nonas-hunter
Copy link

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!

@okonek
Copy link
Contributor

okonek commented Nov 20, 2018

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.

@welcome welcome bot mentioned this issue Nov 11, 2022
5 tasks
This was referenced Jan 21, 2023
@welcome welcome bot mentioned this issue Feb 10, 2023
5 tasks
@welcome welcome bot mentioned this issue May 10, 2023
5 tasks
This was referenced Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation multiple-use outreach issues involve community involvement and helping people who're stuck somewhere
Projects
None yet
Development

No branches or pull requests