Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@garethrees
Last active January 3, 2020 09:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garethrees/773f0f28bf40068fd4582c8a58100211 to your computer and use it in GitHub Desktop.
Save garethrees/773f0f28bf40068fd4582c8a58100211 to your computer and use it in GitHub Desktop.
geocoder resolving dependencies
gareth: ~/src/alexreisner
$ git clone git@github.com:alexreisner/geocoder.git
Cloning into 'geocoder'...
remote: Enumerating objects: 47, done.
remote: Counting objects: 100% (47/47), done.
remote: Compressing objects: 100% (28/28), done.
remote: Total 12238 (delta 25), reused 33 (delta 19), pack-reused 12191
Receiving objects: 100% (12238/12238), 2.57 MiB | 4.09 MiB/s, done.
Resolving deltas: 100% (8077/8077), done.
gareth: ~/src/alexreisner
$ cd geocoder/
gareth: ~/src/alexreisner/geocoder (master=)
$
gareth: ~/src/alexreisner/geocoder (master=)
$ bundle
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
The dependency jgeoip (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
The dependency jdbc-mysql (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
The dependency jdbc-sqlite3 (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
The dependency activerecord-jdbcpostgresql-adapter (~> 1.3.0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...............................................................................................................................................................
gareth: ~/src/alexreisner/geocoder (master=)
$ wget https://gist.githubusercontent.com/garethrees/773f0f28bf40068fd4582c8a58100211/raw/6f6cd37a0fb6e30f8e05e5440a2637ba8248effb/Vagrantfile
# snip…
2020-01-03 09:25:00 (35.7 MB/s) - ‘Vagrantfile’ saved [1608/1608]
gareth: ~/src/alexreisner/geocoder (master=)
$ vagrant up > /dev/null
$ vagrant ssh
Welcome to Ubuntu 18.10 (GNU/Linux 4.18.0-25-generic x86_64)
# snip…
vagrant@ubuntu-cosmic:~$ cd /vagrant/
vagrant@ubuntu-cosmic:/vagrant$ rake
/vagrant/lib/geocoder/lookups/ip2location.rb:66: warning: method redefined; discarding old query_url_params
/vagrant/lib/geocoder/lookups/ip2location.rb:21: warning: previous definition of query_url_params was here
/vagrant/lib/geocoder/results/baidu.rb:40: warning: method redefined; discarding old address
/vagrant/lib/geocoder/results/baidu.rb:10: warning: previous definition of address was here
/vagrant/lib/geocoder/lookups/tencent.rb:43: warning: duplicated when clause is ignored
/vagrant/lib/geocoder/lookups/pickpoint.rb:26: warning: assigned but unused variable - params
/vagrant/test/unit/geocoder_test.rb:43: warning: ambiguous first argument; put parentheses or a space even after `/' operator
/vagrant/test/unit/geocoder_test.rb:44: warning: ambiguous first argument; put parentheses or a space even after `/' operator
/vagrant/test/unit/lookups/ipapi_com_test.rb:31: warning: ambiguous first argument; put parentheses or a space even after `-' operator
/vagrant/test/unit/lookups/location_iq_test.rb:15: warning: ambiguous first argument; put parentheses or a space even after `/' operator
/vagrant/test/unit/lookups/pickpoint_test.rb:23: warning: ambiguous first argument; put parentheses or a space even after `/' operator
/vagrant/test/unit/method_aliases_test.rb:19: warning: ambiguous first argument; put parentheses or a space even after `/' operator
/vagrant/test/unit/model_test.rb:9: warning: ambiguous first argument; put parentheses or a space even after `/' operator
/vagrant/test/unit/mongoid_test.rb:47: warning: ambiguous first argument; put parentheses or a space even after `/' operator
/vagrant/test/unit/mongoid_test.rb:53: warning: ambiguous first argument; put parentheses or a space even after `/' operator
File does not exist: mongoid
rake aborted!
Command failed with status (1)
Tasks: TOP => default => test
(See full trace by running task with --trace)
vagrant@ubuntu-cosmic:/vagrant$ bundle
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
The dependency jgeoip (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
The dependency jdbc-mysql (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
The dependency jdbc-sqlite3 (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
The dependency activerecord-jdbcpostgresql-adapter (~> 1.3.0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies............................................................................................................................................................................................
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Based on https://github.com/rails/rails-dev-box
Vagrant.configure('2') do |config|
config.vm.box = 'ubuntu/cosmic64'
config.vm.box_url = 'http://cloud-images.ubuntu.com/releases/cosmic/release-20190628/ubuntu-18.10-server-cloudimg-amd64-vagrant.box'
config.vm.provision :shell, inline: <<~EOF
apt -y update
apt -y upgrade
apt install -y build-essential bison openssl libreadline7 libreadline-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libxml2-dev autoconf libc6-dev ncurses-dev automake libtool
apt -y install ruby ruby-dev sqlite3 libsqlite3-dev postgresql postgresql-contrib libpq-dev
gem install bundler
sudo -u postgres createuser --superuser vagrant
sudo -u postgres createdb -O vagrant -E UTF8 -T template0 activerecord_unittest
sudo -u postgres createdb -O vagrant -E UTF8 -T template0 activerecord_unittest2
debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'
apt -y install mysql-server libmysqlclient-dev libssl-dev
MYSQL_PWD=root mysql -uroot <<SQL
CREATE USER 'rails'@'localhost';
CREATE DATABASE activerecord_unittest DEFAULT CHARACTER SET utf8mb4;
CREATE DATABASE activerecord_unittest2 DEFAULT CHARACTER SET utf8mb4;
GRANT ALL PRIVILEGES ON activerecord_unittest.* to 'rails'@'localhost';
GRANT ALL PRIVILEGES ON activerecord_unittest2.* to 'rails'@'localhost';
GRANT ALL PRIVILEGES ON inexistent_activerecord_unittest.* to 'rails'@'localhost';
SQL
EOF
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment