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

Work Together To Install plots2 on your Local Machine(Setup) #10844

Open
TildaDares opened this issue Mar 27, 2022 · 89 comments
Open

Work Together To Install plots2 on your Local Machine(Setup) #10844

TildaDares opened this issue Mar 27, 2022 · 89 comments

Comments

@TildaDares
Copy link
Member

TildaDares commented Mar 27, 2022

Hi everyone, welcome to Public Lab🎈. This issue is meant to help you resolve any errors you might be getting while installing plots2 on your local machine or document the steps you took to resolve the error.

  • To install plots2 on your local machine, follow our installation guide
  • For contributors using windows, this is the windows installation guide
  • You can also use gitpod to run and contribute to this codebase. Read more about gitpod. GitPod is our recommended way to begin, and can be used for most contributions!

💻 🎥 Installation video: watch this excellent video of the GitPod install process running, by @AndroGenius-codes: #11467

If you were able to resolve an issue someone else was facing, you can outline the steps you took to resolve the error. Also, if you were able to solve the error, report back with the steps you took to solve the error.

You can also take a look at our previous setup issue to look for solutions to errors you might be facing.
Thank you for contributing to Public Lab.


Also a heads up: if you are installing the plots2 project on your local, maybe consider using sqlite3 for database
. On step 7 choose the second option,

If sqlite3, run cp config/database.yml.sqlite.example config/database.yml to make a copy of config/database.yml.sqlite.example in config/database.yml. kindly note if you choose to use sqlite some tests may fail. The project was setup initially to use mysql and some tests are tailored for mysql db. No need for alarm, we are working to fix these and this will not interfere with your development process

As we are having issues reported by folks using mysql2 (read more)

Originally posted by @cesswairimu in #10840 (comment)

@TildaDares
Copy link
Member Author

Leave a comment here with the details of the errors you're facing. Thank you!

@akanbifatimah
Copy link
Contributor

HI @TildaDares , I have been able to run infragram on my local machine , do I need to install plot2 in order to work on this project

@TildaDares
Copy link
Member Author

Hi @akanbifatimah, no you don't have to install plots2.

@akanbifatimah
Copy link
Contributor

alright,Thank you

@ishikajn8126
Copy link
Contributor

Hello everyone!!
Myself Ishika Jain, an outreachy aspirant..
I'm facing some issue in installing plots2 on my local machine.
I'm stuck at step 5 of standard installation.
I have attached ss of the errors that I'm getting. Would really appreciate any help in solving this issue...

Screenshot from 2022-03-28 19-25-31

Screenshot from 2022-03-28 19-25-11

@TildaDares
Copy link
Member Author

@untari
Copy link
Contributor

untari commented Mar 29, 2022

Hi @TildaDares I'm participating on outreachy, do we have to contribute to the project that listed for the outreachy, or we can contribute to other repo too? Thanks!

@cesswairimu
Copy link
Collaborator

Hi @untari, you can contribute to other repos too. thanks

@untari
Copy link
Contributor

untari commented Mar 29, 2022

Hi @cesswairimu, noted with thanks!

@stephaniequintana
Copy link
Contributor

@ishikajn8126, it appears we may have run into the same issue. My Mac would not download rvm or rbenv due to an SSL certificate problem. In addition to the errors you mentioned, I received the following when I tried to run curl -L https://get.rvm.io | bash -s stable.

Screen Shot 2022-03-22 at 4 30 10 PM

If you're experiencing the same, please reach out to me. I found a quick and easy way to bypass this.

Also, please be advised that many in the community work exclusively with/through gitpod, it's a great alternative to setting up your local environment and you'll be immediately up and running.

@ishikajn8126
Copy link
Contributor

Hi @ishikajn8126, have you installed rbenv or rvm? https://github.com/publiclab/plots2/blob/main/doc/PREREQUISITES.md#ruby

Hey @TildaDares, yeah i seem to have skipped the prerequisities...
Got that issue resolved now!

@ishikajn8126
Copy link
Contributor

@ishikajn8126, it appears we may have run into the same issue. My Mac would not download rvm or rbenv due to an SSL certificate problem. In addition to the errors you mentioned, I received the following when I tried to run curl -L https://get.rvm.io | bash -s stable.

Screen Shot 2022-03-22 at 4 30 10 PM

If you're experiencing the same, please reach out to me. I found a quick and easy way to bypass this.

Also, please be advised that many in the community work exclusively with/through gitpod, it's a great alternative to setting up your local environment and you'll be immediately up and running.

Hey @stephaniequintana! Thanks a lot for offering support!!
I got that issue resolved!

@Forchapeatl
Copy link
Contributor

@TildaDares I was able to resolve this issue 4396 . The error occurs when step 6 of the installation guide is skipped.

@PeculiarE
Copy link
Contributor

If you're experiencing the same, please reach out to me. I found a quick and easy way to bypass this.

Also, please be advised that many in the community work exclusively with/through gitpod, it's a great alternative to setting up your local environment and you'll be immediately up and running.

Hello @stephaniequintana. So I did try starting the app on gitpod. But got this error:

Screenshot 2022-03-29 at 23 38 25

Have you been able to succesfully run the app on gitpod?

@stephaniequintana
Copy link
Contributor

stephaniequintana commented Mar 29, 2022

@PeculiarE, the original error I was referring to, above, is the one pertaining to the SSL Certificate problem. I solved that on (on my Mac) by bypassing the curl security and I was then, finally, able to download rvm. I was still unable to setup my local environment, view the thread starting here: #4936 (comment).

To your specific question, I did finally get GitPod to run successfully. I cannot advise you on what to do, but I will tell you what I did. Firstly, per the above thread, I incorrectly ran passenger start in GitPod. This is not necessary as it is already configured in plots2/.gitpod.yml to do so. <- I actually did do this in my local environment, per the thread... The next time I opened the repo in GitPod, there were a multitude of differences between my forked branch and the origin (mostly due to everything under the sun I was downloading to get zsh to cooperate with rvm). Rather than ignoring those, or squashing specific commits or rebasing to an earlier commit, or ...(there were many ways I could have remedied my branch)... I deleted the repo and started with a freshly forked one. After that, pending the VERY long build, the error page was no longer there and the app now runs smoothly.

I'm sorry I cannot provide more specific direction. Although, I do highly recommend asking the group. I'm a bit blown away by the knowledge and willingness to help that everyone here seems to have ❤️

@ishikajn8126
Copy link
Contributor

Hey everyone!
I got stuck with another error at step 5 of standard installation, which occurred on running the command bundle install :
Would really appreciate any help in this regard..!

Screenshot from 2022-03-30 11-49-12

Screenshot from 2022-03-30 11-49-25

Screenshot from 2022-03-30 11-49-45

@TildaDares
Copy link
Member Author

Hi @ishikajn8126, do you have nodejs installed? You can install it by running sudo apt-get install nodejs

@PeculiarE
Copy link
Contributor

PeculiarE commented Mar 30, 2022

Thank you, @stephaniequintana. So, I wasn't running GitPod on my fork but directly from the main repo. Even tried setting it up on my local machine but kept on encountering one error or the other. Eventually, I followed your advice: deleted my existing fork, re-forked, and then tried running it again on GitPod. Had to change the db configuration in the database.yml file to an sqlite3 db before it eventually worked 🎉. Thank you so much!

P.S. Did you have to tweak your database.yml file as well? Or it worked for you right out of the bag?

@PeculiarE
Copy link
Contributor

@ishikajn8126 When I tried setting up the project on my machine too, I faced this error even though I had nodejs already installed. But luckily for me, the error message also told me the command to run to fix it. The command was quite long and I can't remember it exactly. And sadly, recent console messages in my terminal have overwritten it. 😢 😞

I would suggest exactly what @stephaniequintana said. Try running the project on GitPod instead. It will save you time because even though I fixed this error you're facing now, I encountered like 6 more ahead and the app didn't still run perfectly after trying to fix all of them.

If you do have any issues running it on GitPod, please feel free to reach out to either me or Stephanie as it is working quite well for both of us 😄

@illyShelly
Copy link
Contributor

illyShelly commented Mar 30, 2022

Hello @TildaDares ,
I would like to point to one thing and differences which I found out during installation and reading files. The link you mentioned above for standard installation https://github.com/publiclab/plots2#standard-installation differs from the Readme file for plot2 repo link: https://github.com/publiclab/plots2/blob/master/README.md

Especially,

  • in version of ruby 2.7.3 vs. 2.4.4,
  • then older way to run command to exclude mysql db (--without ),
  • point 10. there is missing this line: Setup React & webpacker by running rails webpacker:install && rails webpacker:install:react && rails generate react:install and info about prompt what to do so, or better to say not to do.

I ran into error message related to webpack and manifest.json which I solved with this command: bundle exec rake webpacker:install

I could update it 🙂

This was my error after running server:
Screenshot 2022-03-30 at 17 55 02

@stephaniequintana
Copy link
Contributor

@PeculiarE, I'm so glad to learn you're up and running.

P.S. Did you have to tweak your database.yml file as well? Or it worked for you right out of the bag?

I actually tweaked the file (commented out the sql directive) initially. Though I meant to, I never went back to see if it would worked without the directive commented out.

Honestly, I experienced so many issues trying to set up locally that once I realized I can work (and gain experience) with GitPod, I never looked back. When I find some time, I will try again (bc I LOVE my VScode setup), but the errors I encountered and the (embarrassingly) amount of time I wasted coupled with the time constraints were outweighed by my excitement to get started. @ishikajn8126, I hope you're finally set up, too. If not, @PeculiarE makes an excellent point towards the time you will save (and from our personal experience, the errors you are likely to encounter in the upcoming steps).

Cheers, all - I hope everyone is having a great day!

@Forchapeatl
Copy link
Contributor

If you're experiencing the same, please reach out to me. I found a quick and easy way to bypass this.
Also, please be advised that many in the community work exclusively with/through gitpod, it's a great alternative to setting up your local environment and you'll be immediately up and running.

Hello @stephaniequintana. So I did try starting the app on gitpod. But got this error:

Screenshot 2022-03-29 at 23 38 25

Have you been able to succesfully run the app on gitpod?

@PeculiarE here is the solution #4396 (comment)

@TildaDares
Copy link
Member Author

for standard installation https://github.com/publiclab/plots2#standard-installation differs from the Readme file for plot2 repo link: https://github.com/publiclab/plots2/blob/master/README.md

Hi @illyShelly, thank you for the observation! We no longer make use of the master branch so it's the README on the main branch you should use https://github.com/publiclab/plots2/blob/main/README.md

@illyShelly
Copy link
Contributor

illyShelly commented Mar 30, 2022

@TildaDares got it 😄 I have no idea how I get there. Thank you.

@kunmi02
Copy link
Contributor

kunmi02 commented Apr 12, 2022

@Ademola101 please reject it. Type n and press enter

@Ademola101
Copy link

@kunmi02 Thank you. However, I am getting this error after I start the server by passenger start
Action Controller_ Exception caught - Google Chrome 13_04_2022 10_13_49 am

@kunmi02
Copy link
Contributor

kunmi02 commented Apr 13, 2022

@Ademola101 Kindly follow the steps I shared here #10844 (comment)

@Ademola101
Copy link

My development server is so slow and often bring out this error:

The Phusion Passenger(R) application server tried to start the web application, but this took too much time, so Passenger put a stop to that.

The stdout/stderr output of the subprocess so far is:
[fog][DEPRECATION] Unable to load Fog::Google::Compute
[fog][DEPRECATION] Falling back to deprecated constant Fog::Compute::Google. The preferred format of service provider constants has changed from service::provider to provider::service. Please update this service provider to use the preferred format.
[fog][DEPRECATION] Unable to load Fog::Google::DNS
[fog][DEPRECATION] Falling back to deprecated constant Fog::DNS::Google. The preferred format of service provider constants has changed from service::provider to provider::service. Please update this service provider to use the preferred format.
[fog][DEPRECATION] Unable to load Fog::Google::Storage
[fog][DEPRECATION] Falling back to deprecated constant Fog::Storage::Google. The preferred format of service provider constants has changed from service::provider to provider::service. Please update this service provider to use the preferred format.
/usr/share/rvm/gems/ruby-2.7.3/gems/nokogumbo-2.0.4/lib/nokogumbo/html5.rb:13: warning: already initialized constant Nokogiri::HTML5::HTML_NAMESPACE
/usr/share/rvm/gems/ruby-2.7.3/gems/nokogiri-1.13.3-x86_64-linux/lib/nokogiri/html5.rb:231: warning: previous definition of HTML_NAMESPACE was here
/usr/share/rvm/gems/ruby-2.7.3/gems/nokogumbo-2.0.4/lib/nokogumbo/html5.rb:14: warning: already initialized constant Nokogiri::HTML5::MATHML_NAMESPACE
/usr/share/rvm/gems/ruby-2.7.3/gems/nokogiri-1.13.3-x86_64-linux/lib/nokogiri/html5.rb:232: warning: previous definition of MATHML_NAMESPACE was here
/usr/share/rvm/gems/ruby-2.7.3/gems/nokogumbo-2.0.4/lib/nokogumbo/html5.rb:15: warning: already initialized constant Nokogiri::HTML5::SVG_NAMESPACE
/usr/share/rvm/gems/ruby-2.7.3/gems/nokogiri-1.13.3-x86_64-linux/lib/nokogiri/html5.rb:233: warning: previous definition of SVG_NAMESPACE was here
/usr/share/rvm/gems/ruby-2.7.3/gems/nokogumbo-2.0.4/lib/nokogumbo/html5.rb:16: warning: already initialized constant Nokogiri::HTML5::XLINK_NAMESPACE
/usr/share/rvm/gems/ruby-2.7.3/gems/nokogiri-1.13.3-x86_64-linux/lib/nokogiri/html5.rb:234: warning: previous definition of XLINK_NAMESPACE was here
/usr/share/rvm/gems/ruby-2.7.3/gems/nokogumbo-2.0.4/lib/nokogumbo/html5.rb:17: warning: already initialized constant Nokogiri::HTML5::XML_NAMESPACE
/usr/share/rvm/gems/ruby-2.7.3/gems/nokogiri-1.13.3-x86_64-linux/lib/nokogiri/html5.rb:235: warning: previous definition of XML_NAMESPACE was here
/usr/share/rvm/gems/ruby-2.7.3/gems/nokogumbo-2.0.4/lib/nokogumbo/html5.rb:18: warning: already initialized constant Nokogiri::HTML5::XMLNS_NAMESPACE
/usr/share/rvm/gems/ruby-2.7.3/gems/nokogiri-1.13.3-x86_64-linux/lib/nokogiri/html5.rb:236: warning: previous definition of XMLNS_NAMESPACE was here

@Ademola101
Copy link

Ademola101 commented Apr 15, 2022

I am getting this error
Could not spawn process for application /mnt/c/Users/Ademola/Documents/plot2_2/plots2: A timeout occurred while starting a preloader process.
Error ID: 45d38a72
Error details saved to: /tmp/passenger-error-NCiCuS.html

Web application could not be started - Google Chrome 15_04_2022 8_49_05 am

@kunmi02
Copy link
Contributor

kunmi02 commented Apr 16, 2022

Hey @Ademola101 Have you been able to resolve the issue?

If you look at the passenger server, you should some errors on the server. Can you share what you see on the server here ?

@Ademola101
Copy link

My development server is so slow and often bring out this error:

The Phusion Passenger(R) application server tried to start the web application, but this took too much time, so Passenger put a stop to that.

The stdout/stderr output of the subprocess so far is:
[fog][DEPRECATION] Unable to load Fog::Google::Compute
[fog][DEPRECATION] Falling back to deprecated constant Fog::Compute::Google. The preferred format of service provider constants has changed from service::provider to provider::service. Please update this service provider to use the preferred format.
[fog][DEPRECATION] Unable to load Fog::Google::DNS
[fog][DEPRECATION] Falling back to deprecated constant Fog::DNS::Google. The preferred format of service provider constants has changed from service::provider to provider::service. Please update this service provider to use the preferred format.
[fog][DEPRECATION] Unable to load Fog::Google::Storage
[fog][DEPRECATION] Falling back to deprecated constant Fog::Storage::Google. The preferred format of service provider constants has changed from service::provider to provider::service. Please update this service provider to use the preferred format.
/usr/share/rvm/gems/ruby-2.7.3/gems/nokogumbo-2.0.4/lib/nokogumbo/html5.rb:13: warning: already initialized constant Nokogiri::HTML5::HTML_NAMESPACE
/usr/share/rvm/gems/ruby-2.7.3/gems/nokogiri-1.13.3-x86_64-linux/lib/nokogiri/html5.rb:231: warning: previous definition of HTML_NAMESPACE was here
/usr/share/rvm/gems/ruby-2.7.3/gems/nokogumbo-2.0.4/lib/nokogumbo/html5.rb:14: warning: already initialized constant Nokogiri::HTML5::MATHML_NAMESPACE
/usr/share/rvm/gems/ruby-2.7.3/gems/nokogiri-1.13.3-x86_64-linux/lib/nokogiri/html5.rb:232: warning: previous definition of MATHML_NAMESPACE was here
/usr/share/rvm/gems/ruby-2.7.3/gems/nokogumbo-2.0.4/lib/nokogumbo/html5.rb:15: warning: already initialized constant Nokogiri::HTML5::SVG_NAMESPACE
/usr/share/rvm/gems/ruby-2.7.3/gems/nokogiri-1.13.3-x86_64-linux/lib/nokogiri/html5.rb:233: warning: previous definition of SVG_NAMESPACE was here
/usr/share/rvm/gems/ruby-2.7.3/gems/nokogumbo-2.0.4/lib/nokogumbo/html5.rb:16: warning: already initialized constant Nokogiri::HTML5::XLINK_NAMESPACE
/usr/share/rvm/gems/ruby-2.7.3/gems/nokogiri-1.13.3-x86_64-linux/lib/nokogiri/html5.rb:234: warning: previous definition of XLINK_NAMESPACE was here
/usr/share/rvm/gems/ruby-2.7.3/gems/nokogumbo-2.0.4/lib/nokogumbo/html5.rb:17: warning: already initialized constant Nokogiri::HTML5::XML_NAMESPACE
/usr/share/rvm/gems/ruby-2.7.3/gems/nokogiri-1.13.3-x86_64-linux/lib/nokogiri/html5.rb:235: warning: previous definition of XML_NAMESPACE was here
/usr/share/rvm/gems/ruby-2.7.3/gems/nokogumbo-2.0.4/lib/nokogumbo/html5.rb:18: warning: already initialized constant Nokogiri::HTML5::XMLNS_NAMESPACE
/usr/share/rvm/gems/ruby-2.7.3/gems/nokogiri-1.13.3-x86_64-linux/lib/nokogiri/html5.rb:236: warning: previous definition of XMLNS_NAMESPACE was here

@kunmi02 this is the error

@kunmi02
Copy link
Contributor

kunmi02 commented Apr 17, 2022

@Ademola101 That is not the actual error. Kindly look again. There should be something you can point that could be cause of the erro. Probably database error or something

@simransia simransia mentioned this issue May 1, 2022
5 tasks
@udyanojha
Copy link
Contributor

@TildaDares I'm getting this error previously I was getting issues while running on Ubuntu. So I switched to Gitpod (earlier comments suggested this way) but I'm getting this issue.

Tried Deleting forked repo and reforked
Tried Running Main repo in Git pod

image

@cesswairimu
Copy link
Collaborator

Hi @udyanojha, I experienced the same on my end on gitpod ; running yarn install solved this error, after restarting server you might get "Webpacker error" and running rails webpacker:install should solved it. cc #9871 (comment)

@udyanojha
Copy link
Contributor

Hi @udyanojha, I experienced the same on my end on gitpod ; running yarn install solved this error, after restarting server you might get "Webpacker error" and running rails webpacker:install should solved it. cc #9871 (comment)

Thank you so much!

@hsadia538
Copy link
Contributor

When I run bundle exec passenger start I get:
Screenshot 2022-08-03 at 4 36 42 PM

Anyone having any idea on how to fix this?

@TildaDares
Copy link
Member Author

Hi @hsadia538, have you ran yarn install? That might help.

@hsadia538
Copy link
Contributor

Hi @hsadia538, have you ran yarn install? That might help.

Yes I have, still the same issue.

@hsadia538
Copy link
Contributor

I was able to do the setup with Gitpod and it's running. Thank you to all who commented here and suggested this way.
In my local dev environment, I am trying to log in with the username admin and password password as listed on the main page.
But it says that this user does not exist. Do I really need to do this? If yes then how

@TildaDares
Copy link
Member Author

Hi @hsadia538, can you try creating a new user and see if that works?

@hsadia538
Copy link
Contributor

Member

After signing up on local dev env I am getting this
Screenshot 2022-08-04 at 6 42 43 AM

@Forchapeatl
Copy link
Contributor

@hsadia538 , delete the old fork and try reforking.

@hsadia538
Copy link
Contributor

@Forchapeatl This was my 3rd time reforking the repo and using gitpod to run it.
Is it necessary to get the user created?

@Forchapeatl
Copy link
Contributor

@hsadia538 what database are you using Mysql or Sqlite ?

@hsadia538
Copy link
Contributor

hsadia538 commented Aug 5, 2022

@hsadia538 what database are you using Mysql or Sqlite ?

Sqlite.
I edited the database.yml as follows:
Screenshot 2022-08-05 at 1 53 21 AM

@Forchapeatl
Copy link
Contributor

Forchapeatl commented Aug 5, 2022

@hsadia538 , okay don't edit anything , just follow steps 5,6,7,8 and tell me how it goes https://github.com/publiclab/plots2/#readme

@Forchapeatl
Copy link
Contributor

of the standard installation

@hsadia538
Copy link
Contributor

IT WORKED!!!

No idea what really happened, but I reforked. Redid all the steps 5,6,7,8 mentioned here as per @Forchapeatl's advice.

Got stuck at rails webpacker:install && rails webpacker:install:react && rails generate react:install and it was giving me timeout. I redid the steps from yarn install to the last one following @kunmi02's comment exactly and now everything is working.
I am able to log in using the admin/moderator password.

THANKS ALOT everyone in this thread.

special thanks to @Forchapeatl and @kunmi02 . You guys are amazing!

@Forchapeatl
Copy link
Contributor

you are welcome @hsadia538

@TildaDares
Copy link
Member Author

Hi @AndroGenius-codes, can you try stopping and starting the server?

@naseehasalam
Copy link

Hello I am having this issue with yarn install could someone please help me out
Screenshot_20230724_133738

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

17 participants