PoGoBag icon indicating copy to clipboard operation
PoGoBag copied to clipboard

Problem on local install

Open Juzamous opened this issue 8 years ago • 39 comments

i try to follow your guide on the Readme file, but was stuck at many time.

After installing Windows Ruby 2.2, i was unable to make "Bundle Install" working (Unable to locate path ...) I search the file and there was a wrong path for the ruby.exe file in it.

After that, the command "bundle Install" told me to upgrade it with "gem install bundler", wich i did ...

Them i launch the "rake db:setup" but there was a "database.yml" file missing in the Pogobag directory. I found a ".example" version of it so i rename and redo.

Then i launch again "rake db:setup", some warning about a wdm 0.1.0 gem but was looking ok.

Then after "rails s", whan i was trying to acces to localhost:3000, i was told of a "secrets.yml" missing. Same as before, the file was here ".example" to rename, wich i did.

And now here i am and this is what i have on my screen while launching the site

` LoadError in StaticPagesController#home No such file to load -- google/protobuf_c Extracted source (around line #2):

1 2 3 4 5 6

module SessionsHelper require 'poke-api' require 'pp' def current_user if (name = session[:pogo_alias])

Rails.root: C:/Sites/PoGoBag Application Trace | Framework Trace | Full Trace

app/helpers/sessions_helper.rb:2:in <module:SessionsHelper>' app/helpers/sessions_helper.rb:1:in<top (required)>' app/controllers/application_controller.rb:1:in <top (required)>' app/controllers/static_pages_controller.rb:1:in<top (required)>'

This error occurred while loading the following files: poke-api poke-api/POGOProtos/Signature google/protobuf google/protobuf_c

Request

Parameters:

None

Toggle session dump Toggle env dump Response

Headers:

None

`

I'm not really use to all of this, so maybe i'm missing something obvious.

Thanks for all the help.

Regards

Juzamous avatar Aug 08 '16 08:08 Juzamous

EDIT: It looks like this is a Windows problem. I believe the cause is that

the poke-api gem relies on header files for Ruby to install the google-protobuf gem.

(from https://github.com/nabeelamjad/poke-api)

Go to http://rubyinstaller.org/downloads/ and try to install Ruby 2.3.1 from there.


First: Pull the new repo to get a working database.yml and secrets.yml file.

It also looks like your missing the google-protobuf gem.

  1. Run "gem install bundler" again
  2. Run "bundle install" again
  3. Run "gem install google-protobuf"

See if that works

dphuang2 avatar Aug 08 '16 08:08 dphuang2

It can't find google-protobuf

ERROR:  Could not find a valid gem 'google-protobuf' (>= 0) in any repository
ERROR:  Possible alternatives: odps_protobuf, google_pr, google-authsub, google-
book, google-browse

eXeLe avatar Aug 08 '16 08:08 eXeLe

Try going to http://rubyinstaller.org/downloads/ and installing Ruby 2.3.1 from there.

dphuang2 avatar Aug 08 '16 08:08 dphuang2

Didn't help. Still can't find google-protobuf

eXeLe avatar Aug 08 '16 09:08 eXeLe

What is the output of "gem sources"?

dphuang2 avatar Aug 08 '16 09:08 dphuang2

https://rubygems.org/

eXeLe avatar Aug 08 '16 09:08 eXeLe

Download the Ruby DevKit: http://dl.bintray.com/oneclick/rubyinstaller/DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe

This will apply to your Ruby and you should be able to install the gem.

dphuang2 avatar Aug 08 '16 09:08 dphuang2

I installed google-protobuf and poke-api with the commands below but still getting error as in first message

gem install google-protobuf -v 3.0.0.alpha.2.0 --pre
gem install poke-api

eXeLe avatar Aug 08 '16 10:08 eXeLe

I'm having the same exact issue. I've done everything up to and including eXeLe above me ^.

I've also tried going to protobuf 5.0ish again with no luck. Whatever is happening is related to protobuf_c.

QuadTog avatar Aug 08 '16 14:08 QuadTog

I had the same issue. Running the app using ruby 2.3.1 (as dphuang2 said) solved the problem.

saugon avatar Aug 08 '16 19:08 saugon

Can u describe exacly what you did cause i am getting the same error too Step i did:

DELETED ALL AND FRESH INSTALLER RailsInstaller; rubyinstaller-2.3.1-x64 (installed inside RailsInstaller folder); DevKit-mingw64-64-4.7.2-20130224-1432-sfx, extracted inside C:\RailsInstaller\DevKit; Than used this tutorial to https://github.com/oneclick/rubyinstaller/wiki/development-kit; git clone https://github.com/dphuang2/PoGoBag.git; cd PoGoBag;

  1. Run "gem install bundler" again
  2. Run "bundle install" again
  3. Run "gem install google-protobuf"

C:\Sites\PoGoBag>gem install google-protobuf ERROR: Could not find a valid gem 'google-protobuf' (>= 0) in any repository ERROR: Possible alternatives: odps_protobuf, google_pr, google-authsub, google-book, google-browse

Than tried C:\Sites\PoGoBag>gem install google-protobuf -v 3.0.0.alpha.2.0 --pre and C:\Sites\PoGoBag>gem install poke-api, both sucefully installed, but now i am getting a new error when running the DB

C:\Sites\PoGoBag>rake db:setup rake aborted! LoadError: cannot load such file -- 2.3/pg_ext C:/Sites/PoGoBag/config/application.rb:7:in <top (required)>' C:/Sites/PoGoBag/Rakefile:4:inrequire_relative' C:/Sites/PoGoBag/Rakefile:4:in <top (required)>' LoadError: cannot load such file -- pg_ext C:/Sites/PoGoBag/config/application.rb:7:in<top (required)>' C:/Sites/PoGoBag/Rakefile:4:in require_relative' C:/Sites/PoGoBag/Rakefile:4:in<top (required)>' (See full trace by running task with --trace)

nibewiahn avatar Aug 08 '16 19:08 nibewiahn

Try the new directions I put up in the README and pull the new repo. I think what was happening was that I included the gem for PostgresSQL which ran on production, but gave errors while bundling locally if you did not have Postgres installed locally. This stopped "bundle" from fully executing, missing out on some gems.

dphuang2 avatar Aug 08 '16 19:08 dphuang2

rubyinstaller-2.3.1-x64 or rubyinstaller-2.3.1, because if we use the DevKit-mingw64-64-4.7.2-20130224-1432-sfx we need to use ruby x64 right?

Edit: also is there a specific path to install the dev kit or just inside the Ruby folder?

nibewiahn avatar Aug 08 '16 20:08 nibewiahn

If you are on a 64-bit system. Use the x64 installer. On 32-bit system, use the regular one. I will specify this in the README.

dphuang2 avatar Aug 08 '16 20:08 dphuang2

Cleared everything fresh install using the new README, Needed to use https://github.com/oneclick/rubyinstaller/wiki/development-kit; to change the kit path because i was errors while installing gem bundler, now i am getting this one!

MINGW64 /c/Sites/pogobag (master) $ rake db.setup rake aborted! LoadError: cannot load such file -- sqlite3/sqlite3_native C:/Sites/pogobag/config/application.rb:7:in <top (required)>' C:/Sites/pogobag/Rakefile:4:inrequire_relative' C:/Sites/pogobag/Rakefile:4:in <top (required)>' LoadError: cannot load such file -- sqlite3/2.3/sqlite3_native C:/Sites/pogobag/config/application.rb:7:in<top (required)>' C:/Sites/pogobag/Rakefile:4:in require_relative' C:/Sites/pogobag/Rakefile:4:in<top (required)>' (See full trace by running task with --trace)

nibewiahn avatar Aug 08 '16 20:08 nibewiahn

It is rake db:setup, not rake db.setup

dphuang2 avatar Aug 08 '16 20:08 dphuang2

Sry that was dumb, but still same error

MINGW64 /c/Sites/pogobag (master) $ rake db:setup rake aborted! LoadError: cannot load such file -- sqlite3/sqlite3_native C:/Sites/pogobag/config/application.rb:7:in <top (required)>' C:/Sites/pogobag/Rakefile:4:inrequire_relative' C:/Sites/pogobag/Rakefile:4:in <top (required)>' LoadError: cannot load such file -- sqlite3/2.3/sqlite3_native C:/Sites/pogobag/config/application.rb:7:in<top (required)>' C:/Sites/pogobag/Rakefile:4:in require_relative' C:/Sites/pogobag/Rakefile:4:in<top (required)>' (See full trace by running task with --trace)

nibewiahn avatar Aug 08 '16 20:08 nibewiahn

Can you run "bundle" and output the list of gems that it says you bundled.

dphuang2 avatar Aug 08 '16 20:08 dphuang2

/c/Sites/pogobag (master) $ bundle install Fetching gem metadata from https://rubygems.org/ Fetching version metadata from https://rubygems.org/ Fetching dependency metadata from https://rubygems.org/ Resolving dependencies.... Using rake 11.2.2 Using concurrent-ruby 1.0.2 Using i18n 0.7.0 Using minitest 5.9.0 Using thread_safe 0.3.5 Using builder 3.2.2 Using erubis 2.7.0 Using mini_portile2 2.1.0 Using pkg-config 1.1.7 Using rack 2.0.1 Using nio4r 1.2.1 Using websocket-extensions 0.1.2 Using mime-types-data 3.2016.0521 Using arel 7.1.1 Using net-ssh 3.2.0 Using execjs 2.7.0 Using sass 3.4.22 Using method_source 0.8.2 Using thor 0.19.1 Using will_paginate 3.1.0 Using bundler 1.12.5 Using capistrano-harrow 0.5.3 Using chronic 0.10.2 Using coffee-script-source 1.10.0 Using debug_inspector 0.0.2 Using ffi 1.9.14 Using geocoder 1.3.7 Using google-protobuf 3.0.0.alpha.5.0.5.1 Using multi_xml 0.5.5 Using httpclient 2.8.0 Using multi_json 1.12.1 Using rb-fsevent 0.9.7 Using ruby-xxHash 0.4.0.1 Using puma 3.6.0 Using tilt 2.0.5 Using spring 1.7.2 Using sqlite3 1.3.11 Using turbolinks-source 5.0.0 Using tzinfo 1.2.2 Using nokogiri 1.6.8 Using rack-test 0.6.3 Using sprockets 3.7.0 Using websocket-driver 0.6.4 Using mime-types 3.1 Using net-scp 1.2.1 Using autoprefixer-rails 6.4.0.1 Using uglifier 3.0.1 Using bootstrap-will_paginate 0.0.10 Using whenever 0.9.7 Using coffee-script 2.4.1 Using rb-inotify 0.9.7 Using httparty 0.14.0 Using turbolinks 5.0.1 Using activesupport 5.0.0 Using tzinfo-data 1.2016.6 Using loofah 2.0.3 Using mail 2.6.4 Using sshkit 1.11.2 Using bootstrap-sass 3.3.7 Using listen 3.0.8 Using gpsoauth-rb 0.1.2 Using rails-dom-testing 2.0.1 Using globalid 0.3.7 Using activemodel 5.0.0 Using jbuilder 2.6.0 Using rails-html-sanitizer 1.0.3 Using airbrussh 1.1.0 Using spring-watcher-listen 2.0.0 Using poke-go-api 0.1.1 from https://github.com/nabeelamjad/poke-api.git (at master@e95cfdc) Using activejob 5.0.0 Using activerecord 5.0.0 Using actionview 5.0.0 Using capistrano 3.6.0 Using actionpack 5.0.0 Using capistrano-bundler 1.1.4 Using capistrano-passenger 0.2.0 Using capistrano-rvm 0.1.2 Using actioncable 5.0.0 Using actionmailer 5.0.0 Using railties 5.0.0 Using sprockets-rails 3.1.1 Using capistrano-rails 1.1.7 Using bootstrap-social-rails 4.12.0 Using coffee-rails 4.2.1 Using font-awesome-rails 4.6.3.1 Using jquery-rails 4.1.1 Using jquery-tablesorter 1.22.1 Using web-console 3.3.1 Using zeroclipboard-rails 0.1.2 Using rails 5.0.0 Using sass-rails 5.0.6 Using capistrano-rails-collection 0.0.3 Bundle complete! 30 Gemfile dependencies, 92 gems now installed. Use bundle show [gemname] to see where a bundled gem is installed.

nibewiahn avatar Aug 08 '16 20:08 nibewiahn

Try:

gem uninstall sqlite3
bundle

If that doesn't work, change this line in the Gemfile: gem 'sqlite3' --> gem 'sqlite3', '1.3.11'

dphuang2 avatar Aug 08 '16 20:08 dphuang2

gem uninstall sqlite3
bundle

didnt worked

also changed in the file gem 'sqlite3' --> gem 'sqlite3', '1.3.11'

than bundle again, didnt work either!

But before the new README i could run the rake db:setup just fine

nibewiahn avatar Aug 08 '16 20:08 nibewiahn

Well ...

I run a full restart with your new tutorial on another computer. Was looking good until i launch the database

Here is the error i get https://i.imgur.com/KLi6qhV.png

Juzamous avatar Aug 08 '16 21:08 Juzamous

I think this is because the manual Ruby install does not include sqlite. Install Ruby 2.2.4 from here and tell me if this works: http://railsinstaller.org/en

dphuang2 avatar Aug 08 '16 21:08 dphuang2

Done all the steps and im having the same problems as nibewiahn. installed the Ruby 2.2.4 and nothing changed.

dwbewiahn avatar Aug 08 '16 21:08 dwbewiahn

You are on Windows right? Did you run through these procedures? http://installrails.com/steps/railsinstaller_windows

dphuang2 avatar Aug 08 '16 22:08 dphuang2

I did what u say too Now i'm back to the old situation i was this morning ...

https://i.imgur.com/h7wpMXG.png

https://i.imgur.com/72iaOFY.png

Juzamous avatar Aug 08 '16 22:08 Juzamous

I'm getting same as everyone else $ rake db:setup rake aborted! LoadError: cannot load such file -- sqlite3/sqlite3_native

khag7 avatar Aug 08 '16 23:08 khag7

It's hard for me to debug this issue since I am not on the same operating system. It would be helpful if one of you in the same situation could find a solution through google searching. Sorry for my futility ._. I really want you all to be able to run this and use it as a tool

dphuang2 avatar Aug 08 '16 23:08 dphuang2

WE need a way to install sq3 inside the \Ruby23-x64\lib

nibewiahn avatar Aug 08 '16 23:08 nibewiahn

I Found this just dont know how to follow it but i am new to this and i dont know how to follow

Install DevKit Get autoconf version of sqlite3 sources from https://www.sqlite.org/download.html Start msys shell of DevKit (I have gcc from strawberry perl on PATH, this way I'm sure correct compiler is used) In unpacked location for your sqlite3 configure static version only to avoid keeping DLL on PATH ./configure --disable-shared Build and install it make install DESTDIR=/c/dev/ruby/tmp Remove all existing sqlite3 gems gem uninstall sqlite3 --all Build and install this gem gem install sqlite3 --platform=ruby -- --with-sqlite3-include=/c/dev/ruby/tmp/usr/local/include --with-sqlite3-lib=/c/dev/ruby/tmp/usr/local/lib You may change path where you stage sqlite3 binaries.

Note that folder structure of final gem is different. It has no subfolders for various ruby versions.

P.S. This SO question is relevant. The only difference is not to build shared version of sqlite3. Although there might be an option to use static version while building gem.

nibewiahn avatar Aug 08 '16 23:08 nibewiahn