Ruby on Rails - unable to install SystemTimer

I use windows and I just ran the command:

C:\Sites\cmply>gem install SystemTimer -v '1.2.3' 

and I got this error:

 Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing SystemTimer: ERROR: Failed to build gem native extension. C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb creating Makefile make generating system_timer_native-i386-mingw32.def compiling system_timer_native.c In file included from system_timer_native.c:8:0: c:/RailsInstaller/Ruby1.9.3/include/ruby-1.9.1/ruby/backward/rubysig.h:14:2: warning: #warning rubysig.h is obsolete system_timer_native.c: In function 'install_first_timer_and_save_original_configuration': 

any idea why? Before that, I got another suspicious error:

 Gem files will remain installed in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/SystemTimer-1.2.3 for inspection. Results logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/SystemTimer-1.2.3/ext/system_timer/gem_make.out An error occured while installing SystemTimer (1.2.3), and Bundler cannot continue. Make sure that `gem install SystemTimer -v '1.2.3'` succeeds before bundling. 

and before that, I got another error that showed that my version of Ruby was somehow out of sync:

 C:\Sites\cmply>bundle update rake Updating git://github.com/twitter/twitter-text-rb.git Fetching source index for http://rubygems.org/ Bundler could not find compatible versions for gem "activesupport": In snapshot (Gemfile.lock): activesupport (3.2.3) In Gemfile: rails (= 3.1.3) x86-mingw32 depends on activesupport (= 3.1.3) x86-mingw32 Running `bundle update` will rebuild your snapshot from scratch, using only the gems in your Gemfile, which may resolve the conflict. 

So, is all this rooted in me, having an incompatible ruby ​​version? How should this be allowed?

Thanks!

+6
source share
2 answers

By checking the output that he writes, you are creating for Ruby 1.9.3 with 1.9.1 files included.

It looks like your Ruby installation is somehow broken. I would try reinstalling Ruby 1.9.3 and verify that include files exist in c:/RailsInstaller/Ruby1.9.3/include/ruby-1.9.3/ and not in c:/RailsInstaller/Ruby1.9.3/include/ruby-1.9.1/ .

+3
source

You cannot install gem system_timer with ruby ​​1.9, but this is not an error, it is a function. Here is a description of the full explanation .

"system_timer is only applicable if you are using Ruby 1.8. you need to if you are using Ruby 1.9"

If you are switching from Ruby 1.8 to 1.9, just uninstall gem system_time and update the code related to the timeouts.

+19
source

Source: https://habr.com/ru/post/913049/


All Articles