Search code examples
rubyrubygemsruby-debug

Install gem linecache19 : syntax error near unexpected token


I have tried to install a couple of ways but failed each time. Can you help? The outcome is always the same:

...
creating Makefile

make
generating trace_nums-i386-mingw32.def
/usr/bin/sh: -c: line 1: syntax error near unexpected token `Init_trace_nums.sub(/'
/usr/bin/sh: -c: line 1: `C:/Ruby193/bin/ruby -e \puts EXPORTS,  + Init_trace_nums.sub(/\..*\z/,)\  > trace_nums-i386-mingw32.def'
make: *** [trace_nums-i386-mingw32.def] Error 258

I've seen several related posts, but none with this message. I'm using pik, in case that makes a difference.

I don't know how to interpret this error message. If I should be opening one of the gem source files and correcting its syntax, what file has this issue? (I've opened several in search.)

Specs: Windows 7, Ruby 1.9.3, Rails 3.2.3

What I've tried:

I have tried on the command line:

gem install linecache19

I have tried adding it to my Gemfile, then calling bundle install

gem 'linecache19'

I have tried downloading it from rubyforge and calling:

gem install linecache19-0.5.13.gem

Solution

  • I succeeded at this after almost a month. The solution was to use Ruby DevKit. Instructions for its installation (don't just unpack it) are here.