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

Vagrant - instalation error #104

Open
michcio12174 opened this issue Dec 2, 2016 · 4 comments
Open

Vagrant - instalation error #104

michcio12174 opened this issue Dec 2, 2016 · 4 comments

Comments

@michcio12174
Copy link

michcio12174 commented Dec 2, 2016

After executing vagrant up virtual machine is created and duting that process following error apeers:

==> default: ERROR: Could not find a valid gem 'bundle' (>= 0) in any repository
==> default: ERROR: Possible alternatives: bundle
==> default: /srv/mapwarper /home/vagrant
==> default: sudo: bundle: command not found
==> default: CREATE EXTENSION
==> default: now migrating database. This may take a few minutes
==> default: sudo: bundle: command not found
==> default: /home/vagrant

I can ssh into the virtual machine, but rails in not installed on it - rails c and other commands are not recognized. Is the vagrantfile up to date?

Problem appers on Window 7 64 bit.

@michcio12174
Copy link
Author

michcio12174 commented Dec 8, 2016

I now believe this is a problem with both Vagrantfile and Vagrant itself. The vagrantfile is configured to use ruby 1.9.1, byt other packages require ruby 2.0 or higher.

Configuring the file to download dependencies from readme:
apt-get install -y ruby ruby-dev postgresql-9.3-postgis-2.1 postgresql-server-dev-all postgresql-contrib build-essential git-core libxml2-dev libxslt1-dev imagemagick libmapserver1 gdal-bin libgdal-dev ruby-mapscript nodejs
does not solve the problem as vagrant still installs ruby 1.9.1 and further steps fail.

Console output, where errors apper:

(executing gem1.9.1)
==> default: file 'lib' not found
==> default: file 'lib' not found
==> default: Successfully installed bundler-1.13.6
==> default: Successfully installed bundle-0.0.1
==> default: 2 gems installed
==> default: Installing ri documentation for bundler-1.13.6...
==> default: Installing ri documentation for bundle-0.0.1...
==> default: Installing RDoc documentation for bundler-1.13.6...
==> default: Installing RDoc documentation for bundle-0.0.1...

==> default: /srv/mapwarper /home/vagrant
(executing bundle install)
==> default: The git source git://github.com/timwaters/audited.git uses the g it protocol, which transmits data without encryption. Disable this warning with
bundle config git.allow_insecure true, or switch to the https protocol to k
eep your data secure.
==> default: The git source git://github.com/timwaters/actionpack-action_cachin g.git uses the git protocol, which transmits data without encryption. Disable
this warning with bundle config git.allow_insecure true, or switch to the ht tps protocol to keep your data secure.
==> default: Fetching gem metadata from https://rubygems.org/
==> default: .
==> default: .
==> default: Fetching version metadata from https://rubygems.org/
==> default: .
==> default: .
==> default: Fetching dependency metadata from https://rubygems.org/
==> default: .
==> default: Fetching git://github.com/timwaters/actionpack-action_caching.git
==> default: Fetching git://github.com/timwaters/audited.git
==> default: tins-1.12.0 requires ruby version >= 2.0, which is incompatible wit
h the current
==> default: version, ruby 1.9.3p484
==> default: CREATE EXTENSION
==> default: now migrating database. This may take a few minutes
==> default: bundler: command not found: rake
==> default: Install missing gem executables with bundle install

After ssh to the machine and executing "rails c" it informas that rails was not installed.

@timwaters
Copy link
Owner

Thanks for looking into it. Try changing bundle to "bundler" ?

@timwaters
Copy link
Owner

So it seems as if tins-1.12.0 is what's causing the issue.

I think this may be required from i18n-tasks which has been newly added - if you comment out i18n-tasks in Gemfile what happens?

@michcio12174
Copy link
Author

michcio12174 commented Dec 8, 2016

Strangely changing "bundle" to "bundler" results in:
==> default: ERROR: Could not find a valid gem 'bundler' (>= 0) in any repository
==> default: ERROR: Possible alternatives: bundler

==> default: /srv/mapwarper /home/vagrant
==> default: sudo: bundle: command not found
==> default: CREATE EXTENSION
==> default: now migrating database. This may take a few minutes
==> default: sudo: bundle: command not found
==> default: /home/vagrant

I changed it back to "bundle" but I still get the same errors.

According to this:
https://rubygems.org/gems/bundle
they both should work.

Then I deleted machine and run "vagrant up" one again. This time with "i18n-tasks" commented out and with "budle" and got:

==> default: file 'lib' not found
==> default: file 'lib' not found
==> default: Successfully installed bundler-1.13.6
==> default: Successfully installed bundle-0.0.1
==> default: 2 gems installed
==> default: Installing ri documentation for bundler-1.13.6...
==> default: Installing ri documentation for bundle-0.0.1...
==> default: Installing RDoc documentation for bundler-1.13.6...
==> default: Installing RDoc documentation for bundle-0.0.1...
==> default: /srv/mapwarper /home/vagrant
==> default: The git source git://github.com/timwaters/audited.git uses the git protocol, which transmits data without encryption. Disable this warning with bundle config git.allow_insecure true, or switch to the https protocol to keep your data secure.
==> default: The git source git://github.com/timwaters/actionpack-action_cachin g.git uses the git protocol, which transmits data without encryption. Disable this warning with bundle config git.allow_insecure true, or switch to the https protocol to keep your data secure.
==> default: Fetching git://github.com/timwaters/actionpack-action_caching.git
==> default: sh: 1: git: not found
==> default: Retrying git clone 'git://github.com/timwaters/actionpack-action_caching.git'"/home/vagrant/.bundle/cache/git/actionpack-action_caching-091209c239434f2afe2f57751e40dc82df95502d" --bare --no-hardlinks --quiet due to error (2/4): Bundler::Source::Git::GitCommandError Git error: command git clone 'git://github.com/timwaters/actionpack-action_caching.git' "/home/vagrant/.bundle/cache/git/actionpack-action_caching-091209c239434f2afe2f57751e40dc82df95502d" --bare --no-hardlinks --quiet in directory /srv/mapwarper has failed.
==> default: sh: 1: git: not found
==> default: Retrying git clone 'git://github.com/timwaters/actionpack-action_c aching.git' "/home/vagrant/.bundle/cache/git/actionpack-action_caching-091209c23 9434f2afe2f57751e40dc82df95502d" --bare --no-hardlinks --quiet due to error (3/
4): Bundler::Source::Git::GitCommandError Git error: command git clone 'git://g ithub.com/timwaters/actionpack-action_caching.git' "/home/vagrant/.bundle/cache/ git/actionpack-action_caching-091209c239434f2afe2f57751e40dc82df95502d" --bare - -no-hardlinks --quiet in directory /srv/mapwarper has failed.
==> default: sh: 1: git: not found
==> default: Retrying git clone 'git://github.com/timwaters/actionpack-action_caching.git' "/home/vagrant/.bundle/cache/git/actionpack-action_caching-091209c239434f2afe2f57751e40dc82df95502d" --bare --no-hardlinks --quiet due to error (4/4): Bundler::Source::Git::GitCommandError Git error: command git clone 'git://github.com/timwaters/actionpack-action_caching.git' "/home/vagrant/.bundle/cache/git/actionpack-action_caching-091209c239434f2afe2f57751e40dc82df95502d" --bare --no-hardlinks --quiet in directory /srv/mapwarper has failed.
==> default: sh: 1: git: not found
==> default: Git error: command git clone ==> default: 'git://github.com/timwaters/actionpack-action_caching.git' ==> default: "/home/vagrant/.bundle/cache/git/actionpack-action_caching-091209c239434f2afe2f57751e40dc82df95502d" ==> default: --bare --no-hardlinks --quiet in directory /srv/mapwarper has failed.
==> default: sudo: unknown user: postgres
==> default: sudo: unable to initialize policy plugin
==> default: sudo: unknown user: postgres
==> default: sudo: unable to initialize policy plugin
==> default: sudo: createdb: command not found
==> default: sudo: psql: command not found
==> default: now migrating database. This may take a few minutes
==> default: bundler: command not found: rake
==> default: Install missing gem executables with bundle install
==> default: /home/vagrant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants