gem

Error installing bcyrpt-ruby gem bundle

最后都变了- 提交于 2019-12-12 10:07:40
问题 I'm trying to install the Devises gem, running bundle install and then getting this error with bcrypt-ruby which I haven't had before. What can I do? Installing bcrypt-ruby (3.0.1) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb creating Makefile make xcrun cc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin11.0

Making a Ruby Gem - Cannot Load Such File

。_饼干妹妹 提交于 2019-12-12 09:34:26
问题 I'm attempting to build a Ruby gem using the instructions at http://guides.rubygems.org/make-your-own-gem/. The following seems to work fine and a *.gem file is generated. gem build mygem.gemspec The following also appears to be successful (only if prefaced with sudo ): sudo gem install mygem-0.0.1.gem However, when I attempt to require 'mygem' inside irb, I get the following error: LoadError: cannot load such file -- mygem I've seen similar errors around Stackoverflow but haven't been able

rails s: Could not find rake-10.4.2 in any of the sources (Bundler::GemNotFound)

风格不统一 提交于 2019-12-12 09:29:19
问题 When I start rails with: $ rails s I get: /Users/snowcrash/.rvm/gems/ruby-2.1.5@global/gems/bundler-1.3.5/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find rake-10.4.2 in any of the sources (Bundler::GemNotFound) So, I ran bundle install : $ bundle install Using rake 10.4.2 but gem list rake gives: *** LOCAL GEMS *** rake (10.1.0, 10.0.4) How come I don't have rake 10.4.2 installed? Also, when I run bundle check it gives me: The Gemfile's dependencies are satisfied which

What is the correct way to get google search results?

旧城冷巷雨未停 提交于 2019-12-12 07:59:09
问题 I want to get all the search results for a particular keyword search on google. I've seen suggestions of scraping, but this seems like a bad idea. I've seen Gems (I plan on using ruby) that do scraping and use the API. I've also seen suggestions of using the API. Does anyone know the best way to do this right now? The API Is no longer supported and I've seen people report they get unusable data back. Do the Gems help solve this or no? Thanks in advance. 回答1: According to http://code.google

require self made gem in jruby fails after update to jruby-1.7.13

ぃ、小莉子 提交于 2019-12-12 07:28:43
问题 I used jruby-1.7.0 and testing frame work Test::Unit::TestCase. Now I have updated some gems which caused me to use MiniTest::Test for testing, so I also upgraded to jruby-1.7.13. I have a rake task too which builds my gems with java *.class files instead of ruby *.rb files. Now many things dont work any more like 'rake test', or require "my_gem_xyz" from irb, getting errors like load error and ArrayIndexOutOfBoudsException. I have rvm installed to switch between rubies. How can I use *.class

Why won't bundler install JSON gem?

北战南征 提交于 2019-12-12 07:07:58
问题 I get the following error when attempting to run cap production deploy . DEBUG [dc362284] Bundler::GemNotFound: Could not find json-1.8.1.gem for installation DEBUG [dc362284] An error occurred while installing json (1.8.1), and Bundler cannot continue. DEBUG [dc362284] Make sure that `gem install json -v '1.8.1'` succeeds before bundling. It may be important to note that this deployment was working, than I upgraded to Ruby 2.1.0 to remove an encoding error. I upgraded locally which worked

Adding comments with gem/ Ruby on Rails

╄→尐↘猪︶ㄣ 提交于 2019-12-12 06:47:19
问题 I have been learning some RoR and I have just created my first web application, a photosharing site that is basically a Pinterest copy. Now I am trying to add more functionality and I would like if users would be able to comment pins. I'm using the Commontator Gem: https://github.com/lml/commontator/blob/master/README.md The only problem is that I don't know where to put <%= commontator_thread(commontable) %> in my show.html.erb file. I have tried many different places but for some reason it

How to avoid the source being overwritten when compiling a Gem?

扶醉桌前 提交于 2019-12-12 04:58:23
问题 I am trying to install eventmachine Gem, however a line needs to be commented out in the source for this to work on Ruby 2.0 on Windows x64. I have tried modifying the Gem source in the Ruby build folder but each time I run gem install eventmachine it overwrites my changes. From the command line help there does not appear to be a way to rebuild the gem without unpacking fresh source, however there may be a workaround. Is there a way to build my slightly tweaked source for this Gem? 回答1: Don't

brew and gem both throws 'Permission denied' error whenever I run it

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 04:56:29
问题 This happens whenever I ran 'gem' or 'brew': /Library/Ruby/Site/2.0.0/rubygems/stub_specification.rb:75:in `initialize': Permission denied - /Library/Ruby/Gems/2.0.0/specifications/cocoapods-plugins-0.4.2.gemspec (Errno::EACCES) from /Library/Ruby/Site/2.0.0/rubygems/stub_specification.rb:75:in `open' from /Library/Ruby/Site/2.0.0/rubygems/stub_specification.rb:75:in `data' from /Library/Ruby/Site/2.0.0/rubygems/stub_specification.rb:178:in `valid?' from /Library/Ruby/Site/2.0.0/rubygems

Rails 4.2 & Salesforce API with Restforce returning ActiveModel::ForbiddenAttributesError

爷,独闯天下 提交于 2019-12-12 04:48:48
问题 I'm trying to write a rails 4.2.0.beta2 app that will allow our organisation to interface directly with our salesforce instance. I've been following this really useful entry here. I'm nearly there, i've got my app setup in salesforce, it appears to be firing off the request ok, I can get to the login page and enter my inforamation. However I'm getting the following error upon callback. ActiveModel::ForbiddenAttributesError in SessionsController#create ActiveModel::ForbiddenAttributesError