publiclab / plots2

a collaborative knowledge-exchange platform in Rails; we welcome first-time contributors! :balloon:
https://publiclab.org
GNU General Public License v3.0
958 stars 1.83k forks source link

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

Open TildaDares opened 2 years ago

TildaDares commented 2 years ago

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.

πŸ’» πŸŽ₯ Installation video: watch this excellent video of the GitPod install process running, by @AndroGenius-codes: https://github.com/publiclab/plots2/issues/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 https://github.com/publiclab/plots2/issues/10840#issuecomment-1079627068

kunmi02 commented 2 years ago

Hi @Ademola101 try run gem install crtical-path-css-rails -v '4.1.1' --source 'https://rubygems.org/' on your terminal within the project roo folder. After running that try run bundle install again

Ademola101 commented 2 years ago

Thanks @kunmi02.

This is what I get after running that Screenshot (7)

Forchapeatl commented 2 years ago

Screenshot (6) @Forchapeatl this is the error i am getting

@Ademola101 , seems like your gem version is not compatible with windows first check your gem version gem -v if it's > 2.3.0 run gem update --system 2.3.0 then bundle install reference https://stackoverflow.com/a/25621469

kunmi02 commented 2 years ago

oooppss... @Ademola101 I don't think you can run a rails app successfully on the windows system. If at all you proceed ahead of this stage, you might get stuck at the point of installing ruby using rvm cos rvm ruby binaries does not support windows.

In conclusion, I will advise you use WSL to setup the project or move to Linux or Mac system

Forchapeatl commented 2 years ago

oooppss... @Ademola101 I don't think you can run a rails app successfully on the windows system. If at all you proceed ahead of this stage, you might get stuck at the point of installing ruby using rvm cos rvm does not support windows.

In conclusion, I will advise you use WSL to setup the project or move to Linux or Mac system

that's true , windows is problematic , he could also use gitpod

PeculiarE commented 2 years ago

Wow @kunmi02....that's a pretty long and detailed solution. Where were you when I was having issues running plots2 on Gitpod 🀣 🀣....On a more serious note though, I'm glad it worked for you @simransia πŸ₯³ πŸ₯³ . As @stephaniequintana and @akanbifatimah already alluded to, I fixed my issue by switching from a mysql db to an sqlite one in the database.yml file, and surprisingly that worked for me. Unfortunately, I couldn't replicate that success when trying to help @akanbifatimah set up hers 😞 On that note, @akanbifatimah...were u able to finally get GitPod running following @kunmi02's very detailed debugging process above? πŸ˜„ πŸ˜„

Ademola101 commented 2 years ago

Thanks @kunmi02.

This is what I get after running that Screenshot (7)

Thanks, It was because I was using old version of bundler.

akanbifatimah commented 2 years ago

Wow @kunmi02....that's a pretty long and detailed solution. Where were you when I was having issues running plots2 on Gitpod 🀣 🀣....On a more serious note though, I'm glad it worked for you @simransia πŸ₯³ πŸ₯³ . As @stephaniequintana and @akanbifatimah already alluded to, I fixed my issue by switching from a mysql db to an sqlite one in the database.yml file, and surprisingly that worked for me. Unfortunately, I couldn't replicate that success when trying to help @akanbifatimah set up hers 😞 On that note, @akanbifatimah...were u able to finally get GitPod running following @kunmi02's very detailed debugging process above? πŸ˜„ πŸ˜„

Yes I have been able to run plot2 via gitpod @PeculiarE ,thank you for asking dear. @kunmi02 thank you so much for guiding me through. Thank you, everyone, for all your suggestions, I learned a lot from this process.

Ademola101 commented 2 years ago

Installing webpacker and react. There are some file conflict, should I accept or reject it Screenshot (8)

kunmi02 commented 2 years ago

@Ademola101 please reject it. Type n and press enter

Ademola101 commented 2 years ago

@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 commented 2 years ago

@Ademola101 Kindly follow the steps I shared here https://github.com/publiclab/plots2/issues/10844#issuecomment-1094139973

Ademola101 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

@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

udyanojha commented 2 years ago

@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 commented 2 years ago

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 https://github.com/publiclab/plots2/issues/9871#issuecomment-1187538315

udyanojha commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

hsadia538 commented 2 years ago

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

Yes I have, still the same issue.

hsadia538 commented 2 years ago

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 commented 2 years ago

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

hsadia538 commented 2 years ago

Member

After signing up on local dev env I am getting this

Screenshot 2022-08-04 at 6 42 43 AM
Forchapeatl commented 2 years ago

@hsadia538 , delete the old fork and try reforking.

hsadia538 commented 2 years ago

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

Forchapeatl commented 2 years ago

@hsadia538 what database are you using Mysql or Sqlite ?

hsadia538 commented 2 years ago

@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 commented 2 years ago

@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 commented 2 years ago

of the standard installation

hsadia538 commented 2 years ago

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 commented 2 years ago

you are welcome @hsadia538

TildaDares commented 2 years ago

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

naseehasalam commented 1 year ago

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