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

Support: Installation Issues with MapKnitter #307

Open
SidharthBansal opened this issue Jan 27, 2019 · 137 comments
Open

Support: Installation Issues with MapKnitter #307

SidharthBansal opened this issue Jan 27, 2019 · 137 comments

Comments

@SidharthBansal
Copy link
Member

Facing trouble installing Mapknitter? We are here to help you.

@Dhiraj240
Copy link
Member

@SidharthBansal After tackling to much issues and setting up ubuntu on vmware, today i was able to manage things.
But a small error is coming as when i use curl -L https://get.rvm.io | bash -s stable it asks for a key and there i am getting timeout error which is annoying me.
Need Help !

@SidharthBansal
Copy link
Member Author

SidharthBansal commented Feb 2, 2019 via email

@Dhiraj240
Copy link
Member

Alright, these errors are really annoying.

@Dhiraj240
Copy link
Member

@SidharthBansal Have you found the solution @jywarren can you provide us help with this?

@jywarren
Copy link
Member

jywarren commented Feb 5, 2019

I think checking rvm.io will show how to install rvm the most standard way.

Working on getting it running in ruby 2.4.4 here, too! #320

@jywarren
Copy link
Member

jywarren commented Feb 5, 2019

Yes https://rvm.io shows how to get the keys!

@kaustubh-nair
Copy link
Member

kaustubh-nair commented Feb 6, 2019

Does the docker container work properly?
I'm getting an error while building it.

ERROR: Service 'web' failed to build: The command '/bin/sh -c apt-get update -qq && apt-get install -y bundler libmysqlclient-dev ruby-rmagick libfreeimage3 libfreeimage-dev ruby-dev gdal-bin python-gdal curl libcurl4-openssl-dev libssl-dev zip nodejs-legacy npm ##ALSO TRIED: ruby-pg' returned a non-zero code: 100

@jywarren
Copy link
Member

jywarren commented Feb 6, 2019 via email

@Dhiraj240
Copy link
Member

Thanks it worked @jywarren but now when i ran bundle exec rake db:setup it asked me a root password which didn't work for mysql and it is throwing an error.
I looked stack overflow and other sites but they to haven't solved the issue.
May i know as how can i see or check the root password in ubuntu ?
Although i will check this again in morning.

@kaustubh-nair
Copy link
Member

Here is a larger error log
I was trying to build the container using docker compose

@grvsachdeva
Copy link
Member

Hi @Dhiraj240, you can reset the password using - https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html

And, if you still get error - ERROR 1698 (28000): Access denied for user 'root'@'localhost'" error then, checkout this thread - https://stackoverflow.com/questions/39281594/error-1698-28000-access-denied-for-user-rootlocalhost.

I also faced some of these issues but finally able to resolve them.Thanks!

@icarito
Copy link
Member

icarito commented Feb 8, 2019

@kaunair please check that you have a recent version of Docker. I found a related issue to your log at Shippable/support#4398 and it was an old Docker version! Try it and let us know, also tell us what command did you run exactly, thanks!

@icarito
Copy link
Member

icarito commented Feb 8, 2019

@Dhiraj240 about the MySQL root password if you mean from the container it can be seen in the mysql logs: docker-compose logs db on first run (scroll all the way back).

@niravasher
Copy link

niravasher commented Feb 13, 2019

after bundle install
sudo service mysql start
bundle exec rake db:setup gives Access denied for user 'mapknitter'@'localhost' (using password: YES).
Please provide the root password for your mysql installation

'some random password'
rake aborted!
Mysql2::Error: Access denied for user 'root'@'localhost' (using password: YES)

(I already have set root password for mysql while installing sudo apt-get mysql-server. I also tried the stack overflow solution given by @gauravano but it didn't work for me)

@jywarren
Copy link
Member

jywarren commented Feb 13, 2019 via email

@niravasher
Copy link

Yes, I confirmed they are same. I atried to uninstall and reinstall mysql-server, everything went fine just the last step bundle exec passenger start gave me this
"Message from application: Address already in use - listen(2) (Errno::EADDRINUSE)"
I tried looking over stack overflow, but I didn't find anything in my local running on port 3000

@jywarren
Copy link
Member

jywarren commented Feb 13, 2019 via email

@niravasher
Copy link

niravasher commented Feb 14, 2019

screenshot 25
screenshot 26 _li
@jywarren

@grvsachdeva
Copy link
Member

I gave different names to database in development and in testing:

database yml

@grvsachdeva
Copy link
Member

I faced somewhat similar errors initially, I tried resetting password too but at last I changed the mysql plugin to mysql_native_password instead of auth_socket using - https://stackoverflow.com/questions/39281594/error-1698-28000-access-denied-for-user-rootlocalhost

You can do this on non-root user but changing plugin for root user is really upto you.

@niravasher
Copy link

niravasher commented Feb 19, 2019

Now running "bundle exec passenger start" gives this error
Message from application: Address already in use - listen(2) (Errno::EADDRINUSE).
So by typing sudo lsof -i tcp:3000 i confirmed that there is nothing else going on port 3000 but still doesn't work

@grvsachdeva
Copy link
Member

you can run the rails server on a different port with rails s -p [port-number] . Also, it's fine to start with default server WebRick for development(when you run server with rails s, webrick is used by default) and you can go with passenger after some time.

Thanks!

@jywarren
Copy link
Member

Hi, all, thanks to @gauravano and @sashadev-sky we are now on Ruby 2.4.4: #320

@Dhiraj240
Copy link
Member

@jywarren @gauravano Now, i am getting the following error

bundle exec rake db:setup
rake aborted!
NoMethodError: undefined method `active_record' for #<Rails::Application::Configuration:0x0000556569694a78>
/home/dhiraj/.rvm/gems/ruby-2.4.4/gems/railties-3.2.22.5/lib/rails/railtie/configuration.rb:85:in `method_missing'
/home/dhiraj/mapknitter/config/application.rb:55:in `<class:Application>'
/home/dhiraj/mapknitter/config/application.rb:13:in `<module:Mapknitter>'
/home/dhiraj/mapknitter/config/application.rb:12:in `<top (required)>'
/home/dhiraj/mapknitter/Rakefile:5:in `require'
/home/dhiraj/mapknitter/Rakefile:5:in `<top (required)>'
/home/dhiraj/.rvm/gems/ruby-2.4.4/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
/home/dhiraj/.rvm/gems/ruby-2.4.4/bin/ruby_executable_hooks:24:in `eval'
/home/dhiraj/.rvm/gems/ruby-2.4.4/bin/ruby_executable_hooks:24:in `<main>'
(See full trace by running task with --trace)

I tried the database configuration given in the above screenshots.

@cesswairimu
Copy link
Collaborator

cesswairimu commented Oct 17, 2019

Aha... Please make sure you have copied database.ymland config.yml are copied correctly see @nstjean comment above of the solution.. Was facing the same issue you are pretty close 🤞

@stefanosu
Copy link
Contributor

@nstjean Hey it seems that I'm having the same error you are but I'm having trouble implementing the steps you've done to arrive at fixing the issue. Did you make sure that the config files were properly copied the same as they were from the repo?

@jywarren
Copy link
Member

jywarren commented Dec 4, 2019

Hi all, i had some trouble booting this and traced it to the bootsnap gem, which does caching to speed up application boot. I was able to bypass it by commenting out line 4 of config/boot.rb:

require 'bootsnap/setup' # Speed up boot time by caching expensive operations.

@chepyego
Copy link

chepyego commented Mar 29, 2022

am having trouble setting up my database though am able to acces mysql with mysql -u root -p but when i ran 'bundle exec rails db:setup am getting this error 'MySQL Error: Access denied for user root@localhost i have tried the proposed solutions above but still getting same error

@PeculiarE
Copy link
Contributor

Hello @chepyego. Most times, that error is thrown if you haven't configured your database correctly in the database.yml file. Could you please confirm that the username and password for your development database is correctly inputted?

@chepyego
Copy link

chepyego commented Apr 4, 2022

Hello @PeculiarE i managed to fix it by changing the test_database password and username to be the same as the development database. But am having another problem I can attach a screenshot below
yarnerror

@PeculiarE
Copy link
Contributor

Nicey. Well done 😄 😄 @chepyego. Please check out this stackoverflow thread to fix the incompatible module issue: https://stackoverflow.com/questions/56617209/the-engine-node-is-incompatible-with-this-module.

@chepyego
Copy link

chepyego commented Apr 5, 2022

Nicey. Well done smile smile @chepyego. Please check out this stackoverflow thread to fix the incompatible module issue: https://stackoverflow.com/questions/56617209/the-engine-node-is-incompatible-with-this-module.

am getting twosolution one is to run yarn install --ignore-engines and another one is to delete(delete node_modules/, package-lock.json & yarn.lock) and run yarn install .Am not sure which should I go with, @PeculiarE what is your take here?

@cesswairimu
Copy link
Collaborator

Hi @chepyego , you could give this solution a try

sudo apt-get purge --auto-remove nodejs
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs

@chepyego
Copy link

chepyego commented Apr 5, 2022

Hi @chepyego, you could give this solution a try

sudo apt-get purge --auto-remove nodejs
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs

hey @cesswairimu i think I have managed to solve the issue I installed node v16 and set nvm to use this version then I yarn install and I didn't receive any errors

@chepyego
Copy link

chepyego commented Apr 5, 2022

mapknitter
it is up and running

@chepyego
Copy link

chepyego commented Apr 5, 2022

Thank you @PeculiarE and @cesswairimu for your help

@chepyego
Copy link

chepyego commented Apr 5, 2022

just a quick question @cesswairimu how do we login in using data in seed.rb I haven't understood from the installation guide

@cesswairimu
Copy link
Collaborator

cesswairimu commented Apr 5, 2022

@chepyego if you have already ran rake db:seed (run it if not) you can navigate to this url locally and you should be logged in http://localhost:3000/local/harry

@PeculiarE
Copy link
Contributor

You're welcome @chepyego 😄 ...I'm glad it's working now for you

@PeculiarE
Copy link
Contributor

PeculiarE commented Apr 5, 2022

@cesswairimu .....please, I have a question. If we want to run the app on gitpod, do we need either mysql2 or sqlite3 already installed on our PCs?

Update: i found out the answer to this. Everything on GitPod is using the remote server in the GitPod service, so it doesn't matter if your local has mysql or sqlite installed. The remote will have mysql automatically set up 😄

@chepyego
Copy link

chepyego commented Apr 6, 2022

@chepyego if you have already ran rake db:seed (run it if not) you can navigate to this url locally and you should be logged in http://localhost:3000/local/harry

just ran rake db:seed and I get this huge error which I can't seem to get solution since yesterday (Mysql2::Error: Duplicate entry '82' for key 'warpables.PRIMARY)

@PeculiarE
Copy link
Contributor

PeculiarE commented Apr 11, 2022

just ran rake db:seed and I get this huge error which I can't seem to get solution since yesterday (Mysql2::Error: Duplicate entry '82' for key 'warpables.PRIMARY)

Hi @chepyego...I replied your inquiry on this same issue in the gitter chatroom, but I dunno if you saw it. So I'm just going to repost it here incase you didn't and also to help anyone else who might have this issue in the future.

Here's my best guess: You probably already ran rake db:setup when setting up the project on your PC. I'm not so familiar with Rake, so had to go do my research. Found out that calling the command rake db:setup actually tells your PC to run three commands in succession: db:create, db:schema:load, and db:seed.

As you can see, you've already seeded your db when you ran the db:setup command. So running the db:seed command after already running rake db:setup throws the duplicate error you received.

Hope this makes sense/helps!

@chepyego
Copy link

just ran rake db:seed and I get this huge error which I can't seem to get solution since yesterday (Mysql2::Error: Duplicate entry '82' for key 'warpables.PRIMARY)

Hi @chepyego...I replied your inquiry on this same issue in the gitter chatroom, but I dunno if you saw it. So I'm just going to repost it here incase you didn't and also to help anyone else who might have this issue in the future.

Here's my best guess: You probably already ran rake db:setup when setting up the project on your PC. I'm not so familiar with Rake, so had to go do my research. Found out that calling the command rake db:setup actually tells your PC to run three commands in succession: db:create, db:schema:load, and db:seed.

As you can see, you've already seeded your db when you ran the db:setup command. So running the db:seed command after already running rake db:setup throws the duplicate error you received.

Hope this makes sense/helps!

hey, I guess i didn't see your comment, your point makes sense and is very helpful . i can now make my first PR

@chepyego
Copy link

but still i can't login in the browser with those credentials in in seed.rb

@PeculiarE
Copy link
Contributor

What's the error you get?

@chepyego
Copy link

What's the error you get?

it is not an error but am trying to login in URL using this http://localhost:3000/local/harry where harry is the username and it is in our seed.rb but nothings happens . i don't know if this is how it is suppose to be

@chepyego
Copy link

hey I just ran this I copied from the documentation http://localhost:3000/local/harry and it has worked although I don't see any difference with the one above. Am now good to go thanks a lot again you have really helped me

@PeculiarE
Copy link
Contributor

You're welcome 😃 ❤️ ....glad you're up and running now 🚀

@chepyego
Copy link

You're welcome smiley heart ....glad you're up and running now rocket

yes am happy too I hope am that late to start making my contributions

@PeculiarE
Copy link
Contributor

PeculiarE commented Apr 11, 2022

No, it's not too late. Have you requested for a FTO issue at https://github.com/publiclab/plots2/10153?

@chepyego
Copy link

No, it's not too late. Have you requested for a FTO issue at https://github.com/publiclab/plots2/10153?

Not yet , What is FTO?

@PeculiarE
Copy link
Contributor

PeculiarE commented Apr 11, 2022

It basically stands for first-timer-only and is a label given to issues. An FTO issue is specially curated for first-timers, that is, newbies to the project/codebase.

In an FTO issue, the problem and solution are given to you. All you have to do is implement it by following the instructions given. Solving an FTO issue gets you familiar with the project's version control, starts helping you get familiar with the codebase, and of course, gives you a sense of confidence. Once you're done with solving an FTO, you can progress into looking for a bit more complex issues (e.g. issues with labels such as help-wanted, bug etc.). These issues don't yet have solutions; you have to provide it. You can even start creating FTOs for others.

@chepyego
Copy link

It basically stands for first-timer-only and is a label given to issues. An FTO issue is specially curated for first-timers, that is, newbies to the project/codebase.

In an FTO issue, the problem and solution are given to you. All you have to do is implement it by following the instructions given. Solving an FTO issue gets you familiar with the project's version control, starts helping you get familiar with the codebase, and of course, gives you a sense of confidence. Once you're done with solving an FTO, you can progress into looking for a bit more complex issues (e.g. issues with labels such as help-wanted, bug etc.). These issues don't yet have solutions; you have to provide it. You can even start creating FTOs for others.

okay got it, am an outreachy applicant and plot2 is not part of the outreachy project and I would like to work on this mapknitter project ,I guess I can find some FTO tickets in mapknitter too, or is it a must to work on FTO in publiclab/plot2 project?

@cesswairimu
Copy link
Collaborator

hi all, you are right @chepyego, you do not work on plots2 project , you could just work on mapknitter only. I really love the great collaboration here. Many thanks everyone for helping each other and helping out ❤️ ❤️

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