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

Bundle install out of date #6

Open
tur-ium opened this issue Jan 20, 2020 · 5 comments
Open

Bundle install out of date #6

tur-ium opened this issue Jan 20, 2020 · 5 comments

Comments

@tur-ium
Copy link

tur-ium commented Jan 20, 2020

middleman build does not run. I am running Debian running on Windows Linux Subsystem with Ruby 2.5.5, trying to get an installation running and not sure how to deal with all the old dependencies.
The error I am getting is

 WARN: Unresolved specs during Gem::Specification.reset:
       rack (< 3, >= 1.4.5)
       minitest (~> 5.1)
       ffi (~> 1.0, ~> 1.9)

Full error log:

$ middleman build.js
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Traceback (most recent call last):
        20: from /usr/local/bin/middleman:23:in `<main>'
        19: from /usr/local/bin/middleman:23:in `load'
        18: from /var/lib/gems/2.5.0/gems/middleman-cli-4.3.5/bin/middleman:10:in `<top (required)>'
Please report a bug if this causes problems.
Traceback (most recent call last):
        20: from /usr/local/bin/middleman:23:in `<main>'
        19: from /usr/local/bin/middleman:23:in `load'
        18: from /var/lib/gems/2.5.0/gems/middleman-cli-4.3.5/bin/middleman:10:in `<top (required)>'
        17: from /var/lib/gems/2.5.0/gems/middleman-core-4.3.5/lib/middleman-core/load_paths.rb:15:in `setup_load_paths'
        16: from /var/lib/gems/2.5.0/gems/middleman-core-4.3.5/lib/middleman-core/load_paths.rb:35:in `setup_bundler'
        15: from /var/lib/gems/2.5.0/gems/bundler-2.0.2/lib/bundler.rb:114:in `require'
        14: from /var/lib/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/runtime.rb:65:in `require'
        13: from /var/lib/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/runtime.rb:65:in `each'
        12: from /var/lib/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/runtime.rb:76:in `block in require'
        11: from /var/lib/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/runtime.rb:76:in `each'
        10: from /var/lib/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
         9: from /var/lib/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/runtime.rb:81:in `require'
         8: from /var/lib/gems/2.5.0/gems/requirejs-rails-1.0.1/lib/requirejs-rails.rb:1:in `<top (required)>'
         7: from /var/lib/gems/2.5.0/gems/requirejs-rails-1.0.1/lib/requirejs-rails.rb:1:in `require'
         6: from /var/lib/gems/2.5.0/gems/requirejs-rails-1.0.1/lib/requirejs/rails.rb:1:in `<top (required)>'
         5: from /var/lib/gems/2.5.0/gems/requirejs-rails-1.0.1/lib/requirejs/rails.rb:2:in `<module:Requirejs>'
         4: from /var/lib/gems/2.5.0/gems/requirejs-rails-1.0.1/lib/requirejs/rails.rb:3:in `<module:Rails>'
         3: from /var/lib/gems/2.5.0/gems/requirejs-rails-1.0.1/lib/requirejs/rails.rb:3:in `require'
         2: from /var/lib/gems/2.5.0/gems/requirejs-rails-1.0.1/lib/requirejs/rails/engine.rb:5:in `<top (required)>'
         1: from /var/lib/gems/2.5.0/gems/requirejs-rails-1.0.1/lib/requirejs/rails/engine.rb:6:in `<module:Requirejs>'
/var/lib/gems/2.5.0/gems/requirejs-rails-1.0.1/lib/requirejs/rails/engine.rb:7:in `<module:Rails>': uninitialized constant Rails (NameError)

Also, I had to run bundle update before running bundle install to update for Ruby

@tur-ium
Copy link
Author

tur-ium commented Jan 20, 2020

UPDATE: Managed to get it running using Ubuntu on Windows and Docker. There are two issues: a) getting the Ruby 2.2.2 image required, b) ruby-switch is no longer maintained
Also, ruby-switch is not main
NOTE: It is possible there are some security vulnerabilities which have been addressed in subsequent versions of Ruby, the installer had to install 2 patches.

With that disclaimer aside, here's how to how to install on Ubuntu for Windows:

  1. Set up Docker for Windows and configure WSL following this excellent guide: https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly

In WSL:

  1. git clone https://github.com/decc/twenty-fifty-new-look #This downloads the repo, we'll fix the issues in the Dockerfile in step 4

  2. cd twenty-fifty-new-look

  3. #Install Ruby version manager following these instructions https://rvm.io/rvm/install

  4. Unzip the attached file and copy the updated Dockerfile to the twenty-fifty-new-look directory Dockerfile.zip

  5. docker image build -t twenty-fifty:1.0 . #This builds the docker image

  6. docker container run --publish 8080:80 --detach twenty-fifty twenty-fifty:1.0
    Dockerfile.zip

  7. Open a web browser and navigate to http://localhost:8080

@PhilipSargent
Copy link
Member

PhilipSargent commented Jan 20, 2020 via email

@tur-ium
Copy link
Author

tur-ium commented Jan 27, 2020

@PhilipSargent
I've managed to get it working on Ubuntu using Docker, with a few changes to the Dockerfile to account for external code having been abandonned (eg ruby-switch). Please take a look at the branch I have created here: https://github.com/tur-ium/twenty-fifty-new-look

I hope it works for you too. Let me know

@tur-ium
Copy link
Author

tur-ium commented Feb 4, 2020

UPDATE FOR THOSE WHO CAN'T USE DOCKER

I've managed to also get the server running without Docker by using ruby v2.2.0 (using Ruby Version Manager) on Ubuntu WSL. Had to fiddle a little with the Gemfile to get it to work correctly though.

I will update the fork of this repo at https://github.com/tur-ium/twenty-fifty-calculator with the gemfile

@PhilipSargent
Copy link
Member

PhilipSargent commented Feb 4, 2020 via email

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