dphuang2 / pogobag Goto Github PK
View Code? Open in Web Editor NEWAnalyze and share your Pokémon through a locally run server! Official Site access has been stopped as of 12/23/2016
Analyze and share your Pokémon through a locally run server! Official Site access has been stopped as of 12/23/2016
First off, great project! :)
When trying to set up my own server, noticed a bunch of references to pogobag.me[+user].. since we're running these locally, the hostname (and port) should probably be defined in a config file and all static references to 'pogobag.me' should reference the config parameter.
Also the copy-clipboard-button field becomes rather small (depending on the hostname/url to copy) (155px) should probably be dynamic (or something).
Lastly, donation link is set to you (which I can sort of understand). Might want to make it configurable/hide-able.
As a user that almost never used the terminal before I'm quite proud to get it working. However it took som googling to find solutions for a couple of things in the instructions. I'll just drop what I found here for others to see, or if you'd like to update the instructions.
before 'rvm install 2.3.1'
add 'source /Users/[user]/.rvm/scripts/rvm'
At the bundle install, change to: 'bundle install --without production'
I'm on OSx 10.11.6 and this works on all three machines I'm using.
Thanks for an awesome tool!
Sprockets::Rails::Helper::AssetNotPrecompiled in Users#show
Showing /home/megathorx/PoGoBag/app/views/pokemons/_pokemon.html.erb where line #18 raised:
Asset was not declared to be precompiled in production.
Add Rails.application.config.assets.precompile += %w( pokemon.css )
to config/initializers/assets.rb
and restart your server
Extracted source (around line #9):
pokemon_hash = JSON.parse(file)
number = format("%03d", number)
image_tag("pokemon/"+/[0-9]{3}.{10}.png/.match(Dir["app/assets/images/pokemon/#{number}*"][0]).to_s)
end
end
Trace of template inclusion: app/views/users/show.html.erb
Rails.root: /home/megathorx/PoGoBag
app/helpers/users_helper.rb:9:in `pokemon_image'
app/views/pokemons/_pokemon.html.erb:18:in `_app_views_pokemons__pokemon_html_erb___3140960318332901493_45277320'
app/views/users/show.html.erb:8:in `block in _app_views_users_show_html_erb___1427065017927830792_41332620'
app/views/users/show.html.erb:5:in `_app_views_users_show_html_erb___1427065017927830792_41332620'
Hi,
I tried installing PoGoBag locally, which seemingly succeded.
Rails starts up, but looks like that none of the image folders are referenced in the routes (at least thats my main suspect).
This causes a "TypeError" errors at lines like:
url(<%=image_path 'background-home.jpg'%>)
or
<%= image_tag 'itemstorageupgrade.1.png' %>
etc...
I'm not familiar with ruby or rails. Is this a project error or something went wrong with my installations?
"rake routes" returns this, in case it helpes
Prefix Verb URI Pattern Controller#Action
login POST /login(.:format) sessions#create
logout DELETE /logout(.:format) sessions#destroy
GET /logout(.:format) sessions#destroy
home GET /home(.:format) static_pages#home
about GET /about(.:format) static_pages#about
stats GET /stats(.:format) stats#show
search GET /search(.:format) users#index
GET /:id(.:format) users#show
GET /:id/:stat(.:format) users#show
root GET / static_pages#home
What is the method to force a refresh of server data from local?
Would it be possible to include player/battle/pokemon statistics? Not sure where the information would go though. I would have said the side bar, but that's already taken up for the sorting methods. Could that be moved to be above the pokemon and the stats could go in the side bar? In that case, maybe a drop down menu or buttons you can select for sorting.
Edit to add: Oh! Another place where stats could go, is where the trainer name is on the top of the page, next to your current level, and the last time the information was updated, you could make your name a link. When you click on it, a window can pop up (or can lead to a new page) that contains all the stats I posted below in my original post.
Player Stats:
Battle Stats:
I know for the battle stats, that it currently lists the number of times a specific pokemon attacked and defended a gym, but there's nothing about the overall battle stats.
Pokemon Stats:
For privacy purpose I'd like to change the code so that people can't access / see the bags of other players.
Up to now I removes the stats links + search in the html file and in the route file, but I can't delete the users#id otherwise you can't see your own bag.
Can we add a place to display the level? Neither the Top 100 view nor the Bag view show this.
I finally have everything working, which is great, but I have a minor issue with the auto-refresh. When I run the command in the project directory, I get the following error:
I'm not sure how to fix this. I have a feeling it's something really simple, but this is all new to me, so I have a lot to learn.
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
Trying to install on Win10. I'm getting this error when trying to install all dependencies.
An error occurred while installing debug_inspector (0.0.2), and Bundler cannot continue.
Make sure that `gem install debug_inspector -v '0.0.2'` succeeds before bundling.
Trying to run that line independently I get this.
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing debug_inspector:
ERROR: Failed to build gem native extension.
Any help is appreciated.
Thanks
I'd like to view my bag excluding pokemons I don't like ex: excluding pidgeys, ratattas etc.
While trying to install this on Ubuntu, I noticed that during 'bundle install', it needs:
which I didn't have installed, and they weren't mentioned as requirements.
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
After installation, I can go to localhost:3000, page shows up, but when I tried to authenticate, I get "Can't verify CSRF token authenticity." from the command prompt.
installed on Ubuntu server I can access the webui using locahost:3000, confirmed using curl and using ssh tunneling.
however when I try to access from another machine on my network I get connection refused.
I have enabled port 3000 in the local firewall but that doesn't seem to work, is this set up somehow to block anything but local connections?
any recommendations on firewall changes?
Thanks
An error occurred while installing pg (0.18.4), and Bundler cannot continue.
Make sure that gem install pg -v '0.18.4'
succeeds before bundling.
Trying to put this on a Centos machine.
Can't get it to work :(
When the login is incorrect, the redirect page goes to http://127.0.0.1:3000static_pages/home, when I enter it correctly in the url, http://127.0.0.1:3000/static_pages/home, it works.
So yeah, the login basically doesn't work. The only Error I get is "Authorization code was empty" but when I checked my console it was there, so I don't really know what the issue is here.. Since it's Google stuff and it's important to me I didn't want to take the output in here.
App doesnt work, 0 stars
I was running PoGoBag on my VPS just fine for several days until the past couple days, I keep getting "Authorization code was empty" whenever trying to authorize my google account to view my bag.
Log:
craziplaya21:~/PoGoBag# rails server -b removedVPSipforpirvacy => Booting Puma => Rails 5.0.0 application starting in development on http://removedVPSipforpirvacy => Run
rails server -h` for more startup options
Puma starting in single mode...
\xDD\a" [2016-08-12T20:14:59-04:00]: INFO > Poke::API::RequestBuilder --: [+] Executing RPC request [2016-08-12T20:15:00-04:00]: INFO > Poke::API::Response --: [+] Decoding Main RPC responses [2016-08-12T20:15:00-04:00]: DEBUG > Poke::API::Response --: [+] RPC response "<html>\r\n<head><title>403 Forbidden</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>403 Forbidden</h1></center>\r\n<hr><center>nginx/1.11.1</center>\r\n</body>\r\n</html>\r\n" [2016-08-12T20:15:00-04:00]: INFO > Poke::API::Client --: [+] Cleaning up RPC requests Rendering static_pages/home.html.erb within layouts/application Rendered sessions/_login.html.erb (10.0ms) Rendered static_pages/home.html.erb within layouts/application (265.6ms) Rendered static_pages/_donate_small.html.erb (0.2ms) User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."name" IS NULL LIMIT ? [["LIMIT", 1]] Rendered layouts/_header.html.erb (10.7ms) Completed 200 OK in 540ms (Views: 350.7ms | ActiveRecord: 0.5ms)
I'm not particularly well-versed in coding, I've just been tinkering around with some files as a learning experience. I've managed to implement a Favorite sort, and now I'm attempting to show an icon on the Pokémon card if the Pokémon is favorited.
So far, I've implemented this in pokemon.scss with the following addition:
.favorite{
@include metadata;
width: 10%;
right: 7px;
top: 7.3rem;
span {
font-size: 1.8rem;
}
.fa-2x{
font-size: 1.4rem;
}
}
However, this displays an icon on every Pokémon card as well as a binary integer denoting whether the Pokémon is favorited or not. I need to implemenet an IF statement somewhere which will display the favorite icon only if the Pokémon is favorited (e.g. 'if favorite != 0') but I'm not familiar enough with the syntax to know how to implement this.
It would be nice if you could see the attacks of each Pokemon.
I'm having trouble logging in via the Google Authorization method -- after a fresh install, I'm getting the following error:
ArgumentError in SessionsController#create
wrong number of arguments (given 2, expected 3)
I think this may have something to do with an update to the way Google Authenticates and it's now accepting a third argument. Any thoughts on a quick fix to this? Thanks!
Would like to see display (in the bag view) of candies. It is probably more appropriate as a hover than to take up screen real estate.
When I run rake db:setup
I get the following:
You have 17 pending migrations:
20160727233457 CreateUsers
20160727234844 CreateItems
20160728032754 CreatePokemons
20160802201113 AddOauthToUsers
20160803064943 AddPokeNumToPokemons
20160803184514 ChangeColumnName
20160804002306 RemoveOAuthColumnsFromUser
20160804042930 AddColumnsToPokemons
20160804104111 AddColumnsToUsers
20160804110925 RenameAliasToScreenNameInUsers
20160805025856 FixIntengerMigrationForPokeNum
20160805084720 AddRecencyToPokemons
20160805090935 ChangeColumnNameInPokemons
20160805091252 ChangeCreationTimeToFloat
20160805214848 AddRefreshTokenExpireTimeToUsers
20160805224803 ChangeColumnNameInUsers
20160805235944 AddTeamToUsers
Run rails db:migrate
to update your database then try again.
When I run rails db:migrate:
I get errors like this:
SQLite3::SQLException: table "users" already exists
Anyone knows how to fix this?
'whenever' creates crontab entry, but does not account for path of 'bundle' command -- cron throwing file-not-found errors ( RAILS_ENV=production /root/.rbenv/shims/bundle exec ...)
Hello. I'm new at this. From Windows Step 5, I got this error when running 'gem install rails'
ERROR: Error installing rails:
The 'nio4r' native gem requires installed build tools.
Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
Gem install bundler runs just fine.
I don't have the time to write a pull request right now so I'll just drop this quick. Installing ruby through apt-get in Ubuntu 14.04 installs an old version that cannot install rails. I followed these instructions to install a newer version, and the rest of the instructions worked fine.
Would like to know if you have a discord server or slack for devs? And will you be accepting Pull Requests? Ruby developer here and i already made some (rough) changes on my local server. We could talk about it and maybe share the workload if you want.
For those of us who don't like white backgrounds. :)
is there anyone who can help us with this?
When I switch to mysql2 (MariaDB) everything works fine but IV values. They are all on 0.0%
F, [2016-08-09T16:21:06.060061 #20511] FATAL -- : [682af70f-08fa-4184-b16c-533016d350b1] NoMethodError (undefined method 'upcase' for nil:NilClass):
F, [2016-08-09T16:21:06.060112 #20511] FATAL -- : [682af70f-08fa-4184-b16c-533016d350b1]
F, [2016-08-09T16:21:06.060146 #20511] FATAL -- : [682af70f-08fa-4184-b16c-533016d350b1] app/helpers/sessions_helper.rb:224:in 'get_call'
F, [2016-08-09T16:21:06.060197 #20511] FATAL -- : [682af70f-08fa-4184-b16c-533016d350b1] app/helpers/sessions_helper.rb:126:in 'get_player_info'
F, [2016-08-09T16:21:06.060237 #20511] FATAL -- : [682af70f-08fa-4184-b16c-533016d350b1] app/helpers/sessions_helper.rb:164:in 'setup_client_user_pair'
F, [2016-08-09T16:21:06.060263 #20511] FATAL -- : [682af70f-08fa-4184-b16c-533016d350b1] app/helpers/sessions_helper.rb:156:in 'setup_user'
F, [2016-08-09T16:21:06.060293 #20511] FATAL -- : [682af70f-08fa-4184-b16c-533016d350b1] app/controllers/sessions_controller.rb:10:in 'create'
/usr/local/rvm/gems/ruby-2.3.0/bundler/gems/poke-api-0f56647618ab/lib/poke-api/client.rb:23:in 'login'
/usr/local/rvm/gems/ruby-2.3.0/bundler/gems/poke-api-0f56647618ab/lib/poke-api/client.rb:98:in 'check_expiry'
/usr/local/rvm/gems/ruby-2.3.0/bundler/gems/poke-api-0f56647618ab/lib/poke-api/client.rb:42:in 'call'
app/helpers/sessions_helper.rb:224:in 'get_call'
app/helpers/sessions_helper.rb:126:in 'get_player_info'
Not sure if it is a problem of poke-api or pogobag.
I get the following error in the browser:
/lib64/libc.so.6: version `GLIBC_2.14' not found (required by /usr/local/rvm/gems/ruby-2.3.1/gems/google-protobuf-3.0.0.alpha.5.0.5.1-x86_64-linux/lib/google/protobuf_c.so) - /usr/local/rvm/gems/ruby-2.3.1/gems/google-protobuf-3.0.0.alpha.5.0.5.1-x86_64-linux/lib/google/protobuf_c.so
Any clues ?
Hi, I got the following error messages when I tried to install PoGoBag:-
An error occurred while installing pg (0.18.4), and Bundler cannot continue.
Make sure thatgem install pg -v '0.18.4'
succeeds before bundling.
Jeffersons-iMac:PoGoBag jeffersontan$ gem install pg -v '0.18.4'
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.current directory: /Users/mainuser/.rvm/gems/ruby-2.3.0/gems/pg-0.18.4/ext
/Users/mainuser/.rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20160808-42976-qmk2pu.rb extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
The mkmf.log file is as follows:-
find_executable: checking for pg_config... -------------------- no
find_header: checking for libpq-fe.h... -------------------- no
"gcc -o conftest -I/Users/mainuser/.rvm/rubies/ruby-2.3.0/include/ruby-2.3.0/x86_64-darwin15 -I/Users/mainuser/.rvm/rubies/ruby-2.3.0/include/ruby-2.3.0/ruby/backward -I/Users/mainuser/.rvm/rubies/ruby-2.3.0/include/ruby-2.3.0 -I. -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -fno-common -pipe conftest.c -L. -L/Users/mainuser/.rvm/rubies/ruby-2.3.0/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -L. -fstack-protector -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -lruby.2.3.0 -lpthread -ldl -lobjc "
checked program was:
/* begin _/
1: #include "ruby.h"
2:
3: int main(int argc, char *_argv)
4: {
5: return 0;
6: }
/* end */"gcc -E -I/Users/mainuser/.rvm/rubies/ruby-2.3.0/include/ruby-2.3.0/x86_64-darwin15 -I/Users/mainuser/.rvm/rubies/ruby-2.3.0/include/ruby-2.3.0/ruby/backward -I/Users/mainuser/.rvm/rubies/ruby-2.3.0/include/ruby-2.3.0 -I. -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -fno-common -pipe conftest.c -o conftest.i"
conftest.c:3:10: fatal error: 'libpq-fe.h' file not foundinclude <libpq-fe.h>
^
1 error generated.
checked program was:
/* begin /
1: #include "ruby.h"
2:
3: #include <libpq-fe.h>
/ end */
I'm using:-
OS X El Capitan v 10.11.6
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
Rails 5.0.0
Let me know if you need any more information
I want to be able to connect to the server from other local computers and/or via port forwarding. Setting bind tcp in puma config did not seem to work. Any way to build a configuration option to bind to a system's ip?
Hi all,
I get the following error:
An error occurred while installing pg (0.18.4), and Bundler cannot continue.
Make sure that gem install pg -v '0.18.4'
succeeds before bundling.
And if I do: gem install pg -v '0.18.4', I get the follow error:
uilding native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
current directory: /Users/ss/.rvm/gems/ruby-2.3.0/gems/pg-0.18.4/ext
/Users/ss/.rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20160808-61172-1gqloum.rb extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/ss/.rvm/rubies/ruby-2.3.0/bin/$(RUBY_BASE_NAME)
--with-pg
--without-pg
--enable-windows-cross
--disable-windows-cross
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/ss/.rvm/gems/ruby-2.3.0/extensions/x86_64-darwin-15/2.3.0/pg-0.18.4/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Users/ss/.rvm/gems/ruby-2.3.0/gems/pg-0.18.4 for inspection.
Results logged to /Users/ss/.rvm/gems/ruby-2.3.0/extensions/x86_64-darwin-15/2.3.0/pg-0.18.4/gem_make.out
PTC accounts should not be allowed to refresh data since there is no token to do so. At the moment, no warning message appears because no redirect to a different page happens, only the updating of html content through AJAX.
Copy button does not successfully copy the user link if you load a page for the first time (ie. click "Bag" or "Top 100" in the header). To make the copy-button work, you must refresh the page.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.