rubygems

Receiving error on Windows machine when Installing linecache ERROR: Failed to build gem native extension on

情到浓时终转凉″ 提交于 2020-01-14 01:43:06
问题 When attempting to perform a bundle install of an existing Ruby on Rails project I receive an error when the bundler reaches Installing linecache (0.43) with native extensions . I don't see linecache in the projects Gem file so I can't try bundling without it. I'm running Windows 7 and JetBrains RubyMine 2.0.2. I have tried bundling from inside RubyMine and from the command line (I realize these are equivalent). I have the following Ruby and DevKit-3.4.5-20100819-1535-sfx directories in my

Receiving error on Windows machine when Installing linecache ERROR: Failed to build gem native extension on

泪湿孤枕 提交于 2020-01-14 01:42:31
问题 When attempting to perform a bundle install of an existing Ruby on Rails project I receive an error when the bundler reaches Installing linecache (0.43) with native extensions . I don't see linecache in the projects Gem file so I can't try bundling without it. I'm running Windows 7 and JetBrains RubyMine 2.0.2. I have tried bundling from inside RubyMine and from the command line (I realize these are equivalent). I have the following Ruby and DevKit-3.4.5-20100819-1535-sfx directories in my

How does the pessimistic version operator (~>) in Ruby handle alpha/beta versions?

人走茶凉 提交于 2020-01-14 01:42:20
问题 I understand how the "pessimistic version operator" works with normal, numeric version specifiers (see also this question), but how does it process alpha or beta versions such as '~> 2.0.0.alpha.4'? Will this match future beta and stable versions? 回答1: I ran a couple of quick tests in irb with the following pattern: Gem::Requirement.new("~> 2.0.0.alpha.4").satisfied_by?(Gem::Version.new("[version.string.to.test]")) For instance: irb(main):001:0> Gem::Requirement.new("~> 2.0.0.alpha.4")

chef ruby gem installer failing

六月ゝ 毕业季﹏ 提交于 2020-01-13 10:39:28
问题 I am trying to setup cassandra on an CentOS VM via chef and it fails with the error below. I have tried clearing out bundle caches to no avail. The recipe works on another machine but a key difference is that I ran other recipes on that machine beforehand so I suspect I am missing a chef dependency (which is why I haven't tried just fixing the packages directly). I am also terribly new to ruby so sorry if this is an obvious question. Machine config Chef: 11.4.0 ruby 1.9.3p286 (2012-10-12

Something wrong with my ruby

房东的猫 提交于 2020-01-13 09:35:08
问题 Always the same error: AilixdeMacBook-Pro:~ Ailix$ ruby -v ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14] AilixdeMacBook-Pro:~ Ailix$ ruby -d Exception `LoadError' at /Library/Ruby/Site/2.0.0/rubygems.rb:1240 - cannot load such file -- rubygems/defaults/operating_system Exception `LoadError' at /Library/Ruby/Site/2.0.0/rubygems.rb:1249 - cannot load such file -- rubygems/defaults/ruby Exception `NameError' at /Library/Ruby/Site/2.0.0/rubygems.rb:1257 - uninitialized

Proper way of testing gems

眉间皱痕 提交于 2020-01-13 09:14:42
问题 If a gem has rails dependencies, do you think it is better to write the gem tests in a way they can be run standalone or run them under a rails project? 回答1: A gem should be a piece of code which acts stand-alone. Otherwise it is part of the application, so the tests should be created stand-alone as well. In this way others (hypothetically) can perform the tests as well. If the tests depend on your application others cannot test your gem. Furthermore when you want to test your gem it should

Problems in installing thin on windows 7

瘦欲@ 提交于 2020-01-13 07:24:12
问题 I am new to ruby. I am trying to install a ruby gem thin. It shows an error in installing the gem. I googled for the error but i could not find a link that addresses my problem. The error is: C:\Users\name\Desktop>ruby -v ruby 2.0.0p247 (2013-06-27) [i386-mingw32] C:\Users\name\Desktop>gem -v 2.0.3 C:\Users\name\Desktop>gem install thin Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing thin: ERROR: Failed to build

Is there a ruby gem that does diff between HTML documents?

老子叫甜甜 提交于 2020-01-13 05:33:07
问题 Doing a diff of two different html documents turns out to be an entirely different problem than simply doing a diff of plain text. For example, if I do a naive LCS diff between: Google</p> and Google</a></p> the diff result is NOT: </a> but /a></ I've tried most gems out there that claim to be html diff but all of them seem to be just implementing text based LCS diff. Is there any gem that does a diff while taking html tags into account? 回答1: After much searching for a gem to do this for me,

undefined method `explain' for #<ActiveRecord::ConnectionAdapters::MysqlAdapter

瘦欲@ 提交于 2020-01-12 19:14:09
问题 I'm new to Ruby on Rails, but I have followed some tutorials and know my way around a little bit. I have generated some scaffolding and inserted data into a MySql database. When navigating to index.html.erb I receive the error in the title The controller is executing index def index @beers = Beer.all respond_to do |format| format.html # index.html.erb format.json { render :json => @beers } end end And has this as a structure Beer: id, brewer_id, name, price, score, color, brew_type, create_at

undefined method `explain' for #<ActiveRecord::ConnectionAdapters::MysqlAdapter

爱⌒轻易说出口 提交于 2020-01-12 19:12:29
问题 I'm new to Ruby on Rails, but I have followed some tutorials and know my way around a little bit. I have generated some scaffolding and inserted data into a MySql database. When navigating to index.html.erb I receive the error in the title The controller is executing index def index @beers = Beer.all respond_to do |format| format.html # index.html.erb format.json { render :json => @beers } end end And has this as a structure Beer: id, brewer_id, name, price, score, color, brew_type, create_at