Open SidharthBansal opened 5 years ago
@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 !
Same behaviour here. Trying to debug.
On Sat, Feb 2, 2019, 8:23 PM Dhiraj Sharma <notifications@github.com wrote:
@SidharthBansal https://github.com/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 !
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/mapknitter/issues/307#issuecomment-459971127, or mute the thread https://github.com/notifications/unsubscribe-auth/AUACQ0DvKRWDEHxVbtqOYbv0oWmt7VFwks5vJaZbgaJpZM4aUmi0 .
Alright, these errors are really annoying.
@SidharthBansal Have you found the solution @jywarren can you provide us help with this?
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! https://github.com/publiclab/mapknitter/pull/320
Yes https://rvm.io shows how to get the keys!
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
oh, hmm, maybe this is a question for @icarito - but the docker container should be used in Travis, and that is building currently. Can you add more information from the error you saw, maybe a fuller log shared in gist.github.com? Thanks!
On Wed, Feb 6, 2019 at 9:43 AM Kaustubh Nair notifications@github.com wrote:
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 -qqe-dev ruby-dev gdal-bin python-gdal curl libcurl4-openssl-dev libssl-dev zip nod
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/mapknitter/issues/307#issuecomment-461047491, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ6cMS6lyDncSHxzzXHqXvLQPWCK7ks5vKun-gaJpZM4aUmi0 .
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.
Here is a larger error log I was trying to build the container using docker compose
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!
@kaunair please check that you have a recent version of Docker. I found a related issue to your log at https://github.com/Shippable/support/issues/4398 and it was an old Docker version! Try it and let us know, also tell us what command did you run exactly, thanks!
@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).
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)
Hi, have you configured the passwords and usernames in /config/database.yml?
On Wed, Feb 13, 2019 at 11:33 AM Nirav Asher notifications@github.com wrote:
On entering "bundle exec rake db:setup" Getting the error "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) rake aborted! Mysql2::Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/mapknitter/issues/307#issuecomment-463268879, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ_m5zF-3x8_qCu622YJUzbKeIfI2ks5vND5GgaJpZM4aUmi0 .
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
Hm, it may be that you are already running the server in another terminal
window... but that doesn't address the mysql issue. Are you able to log in
manually to mysql using mysql -u root -p PASSWORD
without trouble? And
can you share your database.yml (but please strip out the PASSWORD field
itself!)?
On Wed, Feb 13, 2019 at 2:52 PM Nirav Asher notifications@github.com wrote:
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
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/mapknitter/issues/307#issuecomment-463343075, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJz9WefOay2ok2YArE-v5YsqjDFk7ks5vNGz3gaJpZM4aUmi0 .
@jywarren
I gave different names to database in development and in testing:
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.
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
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!
Hi, all, thanks to @gauravano and @sashadev-sky we are now on Ruby 2.4.4: https://github.com/publiclab/mapknitter/pull/320
@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.
Although i ran bundle update
but this problem still persists.
Hey @Dhiraj240, which database config you used, please point to the comment?
I gave different names to database in development and in testing:
@gauravano this one
Was having trouble with mysql was throwing this error ERROR 1698 (28000): Access denied for user 'root'@'localhost'" error
even after following the above steps. What worked for me was removing mysql and deleting mysql user and doing a fresh installation so I can setup a password. Here are the command steps i followed
sudo -i
service mysql stop
killall -KILL mysql mysqld_safe mysqld
apt-get --yes purge mysql-server mysql-client
apt-get --yes autoremove --purge
apt-get autoclean
deluser --remove-home mysql
delgroup mysql
rm -rf /etc/apparmor.d/abstractions/mysql /etc/apparmor.d/cache/usr.sbin.mysqld /etc/mysql /var/lib/mysql /var/log/mysql* /var/log/upstart/mysql.log* /var/run/mysqld
updatedb
exit
Thank you @cesswairimu!! Would you be interested in adding this to the MYSQL.md
file? And any setup recommendations / instructions you have for your OS? Currently we only have steps there for MacOS
Hey @sashadev-sky, sure will do. Thanks
Any fixes for this error mapknitter/tmp/pids/passenger.3000.pid" failed (13: Permission denied) nginx: configuration file nginx.conf test failed
when starting the server
Hi @jywarren,
Thanks for responding! Here's my error again after trying to install the project locally. Posting everything just in case. This is while running bundle
:
Using libv8 3.16.14.19 (x86_64-darwin-16)
Using mimemagic 0.3.0
Fetching mysql2 0.3.21
Installing mysql2 0.3.21 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/emmilie/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/mysql2-0.3.21/ext/mysql2
/Users/emmilie/.rbenv/versions/2.4.4/bin/ruby -r ./siteconf20190329-19328-191030x.rb extconf.rb
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... no
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
-----
Using mysql_config at /usr/local/bin/mysql_config
-----
checking for mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... yes
-----
Don't know how to set rpath on your system, if MySQL libraries are not in path mysql2 may not load
-----
-----
Setting libpath to /usr/local/Cellar/mysql/8.0.15/lib
-----
creating Makefile
current directory: /Users/emmilie/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/mysql2-0.3.21/ext/mysql2
make "DESTDIR=" clean
current directory: /Users/emmilie/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/mysql2-0.3.21/ext/mysql2
make "DESTDIR="
compiling client.c
client.c:439:3: error: use of undeclared identifier 'my_bool'
my_bool res = mysql_read_query_result(client);
^
client.c:441:19: error: use of undeclared identifier 'res'
return (void *)(res == 0 ? Qtrue : Qfalse);
^
client.c:762:3: error: use of undeclared identifier 'my_bool'
my_bool boolval;
^
client.c:793:7: error: use of undeclared identifier 'boolval'
boolval = (value == Qfalse ? 0 : 1);
^
client.c:794:17: error: use of undeclared identifier 'boolval'
retval = &boolval;
^
client.c:797:10: error: use of undeclared identifier 'MYSQL_SECURE_AUTH'; did you mean 'MYSQL_DEFAULT_AUTH'?
case MYSQL_SECURE_AUTH:
^~~~~~~~~~~~~~~~~
MYSQL_DEFAULT_AUTH
/usr/local/Cellar/mysql/8.0.15/include/mysql/mysql.h:188:3: note: 'MYSQL_DEFAULT_AUTH' declared here
MYSQL_DEFAULT_AUTH,
^
client.c:798:7: error: use of undeclared identifier 'boolval'
boolval = (value == Qfalse ? 0 : 1);
^
client.c:799:17: error: use of undeclared identifier 'boolval'
retval = &boolval;
^
client.c:830:38: error: use of undeclared identifier 'boolval'
wrapper->reconnect_enabled = boolval;
^
client.c:1185:38: error: use of undeclared identifier 'MYSQL_SECURE_AUTH'; did you mean 'MYSQL_DEFAULT_AUTH'?
return _mysql_client_options(self, MYSQL_SECURE_AUTH, value);
^~~~~~~~~~~~~~~~~
MYSQL_DEFAULT_AUTH
/usr/local/Cellar/mysql/8.0.15/include/mysql/mysql.h:188:3: note: 'MYSQL_DEFAULT_AUTH' declared here
MYSQL_DEFAULT_AUTH,
^
10 errors generated.
make: *** [client.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/emmilie/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/mysql2-0.3.21 for inspection.
Results logged to /Users/emmilie/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/extensions/x86_64-darwin-16/2.4.0-static/mysql2-0.3.21/gem_make.out
An error occurred while installing mysql2 (0.3.21), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.21' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
mysql2
When I ran gem install mysql2 -v '0.3.21' --source 'https://rubygems.org/'
as suggested, it gave me the following, plus the errors already posted above:
EmmiliesMacBook:mapknitter emmilie$ gem install mysql2 -v '0.3.21' --source 'https://rubygems.org/'
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
current directory: /Users/emmilie/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/mysql2-0.3.21/ex
Thank you and appreciate the help!
Hello @emestabillo, which OS are you using? and just checking did you run sudo apt-get install bundler libmysqlclient-dev imagemagick ruby-rmagick libfreeimage3 libfreeimage-dev ruby-dev libmagickcore-dev libmagickwand-dev
?
Hi @cesswairimu , I am using 10.14.
Yes I've used it but it gives me sudo: apt-get: command not found
. So then I replaced sudo apt-get
with brew
:
EmmiliesMacBook:mapknitter emmilie$ brew install bundler libmysqlclient-dev imagemagick ruby-rmagick libfreeimage3 libfreeimage-dev ruby-dev libmagickcore-dev libmagickwand-dev
Error: No available formula with the name "bundler"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
git -C "$(brew --repo homebrew/core)" fetch --unshallow
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
These similarly named formulae were found:
bundler-completion ✔ rbenv-bundler ✔
dylibbundler rbenv-bundler-ruby-version ✔
To install one of them, run (for example):
brew install bundler-completion ✔
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
I get this after running bundle
:
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (~> 3.2) was resolved to 3.2.22.5, which depends on
bundler (~> 1.0)
Current Bundler version:
bundler (2.0.1)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
Could not find gem 'bundler (~> 1.0)', which is required by gem 'rails (~> 3.2)', in any of the sources.
Next, I tried gem install bundler -v 1.0.10
, no errors
However...it crashed with the next one bundle _1.0.10_ install
I’m also okay with finding another repo if I really can’t install...publiclab has lots! Not sure why mapknitter seems to be complicated on my end :-)
Thank you for taking a look!
@emestabillo I get these issues all the time so don't worry!! We can resolve them. For your mysql issue: I also have macOS 10.14 and apparently mysql is stored differently on the new OS versions so its easier to just make your own custom build. try the one below, it worked for me:
$ bundle config --local build.mysql2 "--with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include"
cmake
installed properly with Homebrew. You need thatFor Bundler could be a few things: try: 1) clearing your cache
$ rm -r .bundle
$ bundle install
2) uninstall bundler 2
3) clear it again
4) check exactly what bundle was used on the lockfile (at the bottom of the lockfile) and run that bundle number like you did bundle _1.0.10 ... above
Let me know if any of this helps!
Hey @emestabillo, sorry for the inconvenience. We are trying hard to make the installation process easy and clearer, and we'll try our best to help you.
We would be done with cloud9 setup https://github.com/publiclab/mapknitter/pull/420 very soon. Also, for now, you can fetch the install-script
branch on cloud9 and do the work. I can help you with project setup on cloud9.
Thanks!
Thanks for the response @sashadev-sky @gauravano ! Still getting errors with installing locally. I may just have to wait for #420 or the cloud9 option as suggested.
Any fixes for this error
mapknitter/tmp/pids/passenger.3000.pid" failed (13: Permission denied) nginx: configuration file nginx.conf test failed
when starting the server
Finally found a fix for this. This is what solved it for me
$ sudo chmod o+w -R /tmp/*
$ sudo rm /tmp/pids/server.pid
@emestabillo have you tried @cesswairimu's solution? If the problem still exists, let us know, we'll give you cloud9 invite and you can fetch the PR #420 and complete the setup. Thanks!
Hi @gauravano , yep still having problems. The cloud9 option might be best for now. However..I think the issue I was going to work on may already be solved #454 . (I also couldn't replicate it on the live site). Let me find another one before I bother you :-) Thank you so much for checking in!
hey @emestabillo, although the issue #454 is solved, we have many more issues and we would love to have your help with them.
So, let's ask @jywarren for a cloud9 invite for you. You can use it whenever you want and as PR for setting cloud9 is not complete so you can share the cloud9 workspace with me and I can do the setup for you.
Thanks!
Appreciate the help @gauravano!
Just noting that the install script at https://github.com/publiclab/mapknitter/blob/main/install_cloud.sh now works at https://Codenvy.io ! It's a very easy install process.
@emestabillo did you need an invite? I might've missed an email if you sent it to me but if you still do, please email web@publiclab.org and I can get you one! Or, try Codenvy, which doesn't need an invite! 👍
Hi @jywarren! Let me try it on Codenvy. I’ll message you if I’m still having issues. Thank you!!
Hello, @jywarren I have tried installing on cloud 9 and on a ubuntu terminal I installed for my windows but each of them gave me the same error: App 21975 output: Error: The application encountered the following error: Access denied for user 'mapknitter'@'localhost' (using password: YES) (Mysql2::Error) I've signed on to Codenvy seeing as c9 will not be available after June 30th anyway but I don't understand what the install process is. Can someone please help me? I've worked on this endlessly to continue to get the same error result that just about everyone here is getting. I look forward to your reply.
Hey @rarrunategu1 In order to install on Codenvy:
https://github.com/USERNAME/mapknitter
source install_cloud.sh
This should set everything up on codenvy If you encounter any problems let us know! Cheers
@kaustubh-nair thank you! I finally have mapknitter on code envy but this other section to install_cloud.sh does not work for me. This is my error - user@:/projects/mapknitter $ source install_cloud.sh bash: install_cloud.sh: No such file or directory
I've done some googling to see what that is about but it all seems very confusing. I ran echo $PATH and this is my result in case it helps /projects/.che/bin:/usr/local/go/bin:/usr /lib/jvm/java-1.8.0-openjdk-amd64/bin:/us r/local/sbin:/usr/local/bin:/usr/sbin:/us r/bin:/sbin:/bin
I appreciate any guidance you can give me.
Hm, can you run just "ls" in the current directory to show where you are? In theory, you should be in the 'mapknitter' folder, and the "install_cloud.sh" file should be there, since it's a copy of this directory: https://github.com/publiclab/mapknitter/tree/main/
What do you see in your local directory when you run "ls"? Thank you!
On Tue, Apr 30, 2019 at 5:04 PM rarrunategu1 notifications@github.com wrote:
@kaustubh-nair https://github.com/kaustubh-nair thank you! I finally have mapknitter on code envy but this other section to install_cloud.sh does not work for me. This is my error - user@:/projects/mapknitter $ source install_cloud.sh bash: install_cloud.sh: No such file or directory
I've done some googling to see what that is about but it all seems very confusing. I ran echo $PATH and this is my result in case it helps /projects/.che/bin:/usr/local/go/bin:/usr /lib/jvm/java-1.8.0-openjdk-amd64/bin:/us r/local/sbin:/usr/local/bin:/usr/sbin:/us r/bin:/sbin:/bin
I appreciate any guidance you can give me.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/mapknitter/issues/307#issuecomment-488114953, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAF6JYBFKEYWOHDKQNFV23PTCX3FANCNFSM4GSSNC2A .
Hi @jywarren, There is a start.sh and install.sh in the mapknitter folder. I don't see a install_cloud.sh folder.
OK, how did you set it up? I think the best way would probably be to enter the Git url like this (note that I actually want to point it at my own fork of MapKnitter):
(also, select "Rails" under "Select Stack")
To fork (for anyone who wants to know), you go to https://github.com/publiclab/mapknitter, and click the Fork
button, which copies the project into your own account, so for me, it makes https://github.com/jywarren/mapknitter. Then, you have an online space corresponding to your work, and can push code there:
Then i pressed Save
, then Create
in the upper right corner.
If you log into github you can select the project this way (only if you've already forked it):
AHA! @rarrunategu1 I realized what happened! It assumes the default branch is master
, but we are tending to use main
instead of master
on projects more and more. So, to switch and get the latest main
branch, you can do:
git checkout -b main && git pull https://github.com/publiclab/mapknitter main
This will get the latest code. SORRY ABOUT THAT!!! 🎉
Facing trouble installing Mapknitter? We are here to help you.