YaleSTC / shifts

Application to easily track shifts, reports, and payforms for employees.
MIT License
23 stars 18 forks source link

debugger doesn't work with Ruby 2.0.0+ #258

Closed caseywatts closed 10 years ago

caseywatts commented 10 years ago

In ruby version 2.0.0+ bundle install fails.

It's because we're using Jazz Hands which brings in Pry Debugger, and pry-debugger doesn't work with Ruby 2.0.0+ https://github.com/nixme/jazz_hands https://github.com/nixme/pry-debugger

We might be able to switch to Pry Byebug? https://github.com/deivid-rodriguez/pry-byebug

Let's just disable jazz hands for now and replace it with vanilla gem 'pry'

jasonkliu commented 10 years ago

Running bundle install with Ruby 2.1.2

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /Users/jason/.rbenv/versions/2.1.2/bin/ruby extconf.rb
Ruby version 2.1.2 is not supported.
*** 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
    --without-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/jason/.rbenv/versions/2.1.2/bin/ruby

extconf failed, exit code 1

Gem files will remain installed in /.../debugger-1.6.3 for inspection.
Results logged to /.../gem_make.out
An error occurred while installing debugger (1.6.3), and Bundler cannot continue.
Make sure that `gem install debugger -v '1.6.3'` succeeds before bundling.
jasonkliu commented 10 years ago

Gem::InstallError: byebug requires Ruby version >= 2.0.0. An error occurred while installing byebug (2.7.0), and Bundler cannot continue. Make sure that gem install byebug -v '2.7.0' succeeds before bundling.

Made separate Gemfile lines, targeted at different ruby versions:

gem 'jazz_hands', platform: [:ruby_19]
gem 'pry-byebug', platform: [:ruby_20]

https://stackoverflow.com/questions/8695532/

mnquintana commented 10 years ago

Good call with pry-byebug - we're going to want to migrate all of our projects to byebug/pry-byebug since debugger is no longer maintained.

dgoerger commented 10 years ago

Commenting out gem 'jazz_hands' and adding gem 'pry-byebug' got it to finish the bundle install for me.

jasonkliu commented 10 years ago

@dgoerger I think the two-liner above is useful for compatibility into the future - especially if the user can use different Ruby versions. Some people like to create different Gemfiles for different ruby versions, but that seems like too much of a hassle to me. :information_desk_person:

jasonkliu commented 10 years ago

Ok I think I was wrong @dgoerger the two-liner doesn't work at the moment... that needs fixing..

jasonkliu commented 10 years ago

This and #288 will have to wait until I get back on my main machine ~approx 2 weeks