gem

Force RubyGems to use HTTP

為{幸葍}努か 提交于 2019-12-10 09:27:42
问题 I've been trying to workaround the fact that gem install is extremely slow on a 2.9GHz Intel Core 7 MacBook Pro. I applied solutions I found on the internet: https://stackoverflow.com/questions/1887704/gem-is-very-slow http://buddingrubyist.wordpress.com/2009/02/14/how-to-speed-up-gem-installs-10x/ However they made no difference to me. A few posts including this one (ruby - bundle install/update too slow, first comment to user1189762's answer) says that RubyGems are slower when fetching from

JRuby Heroku Gem

不问归期 提交于 2019-12-10 05:55:05
问题 Is it possible to use Heroku client with JRuby? I have installed heroku gem successfully with all dependencies, but I can't login. PS D:\Projects\myproject> heroku login Enter your Heroku credentials. Email: myname@mydomain.com Password (typing will be hidden): mypassword ! Heroku client internal error. ! Search for help at: https://help.heroku.com ! Or report a bug at: https://github.com/heroku/heroku/issues/new Error: write would raise (OpenSSL::SSL::SSLError) (Excon::Errors::SocketError)

How to add “pry” when developing a Ruby gem

独自空忆成欢 提交于 2019-12-10 04:28:34
问题 I have a gem called "something". I would like to add pry as a development dependency when developing the gem. However I don't know how to load it. If I have "require something" inside lib/something.rb , when I release the gem, it throws a LoadError, because pry is only a development dependency. At the same time I don't want to keep adding and removing pry when I am committing code. What is the best way to require pry only when developing the application, but not require it as a dependency for

cannot load such file — bootstrap/sass

久未见 提交于 2019-12-10 01:23:29
问题 I am getting cannot load such file -- bootstrap/sass I have installed bootstrap-sass-2.0.3.1, sass-3.1.18, sass-rails-3.2.5, coffee-rails-3.2.2 and uglifier-1.2.4 Why would I be getting this error? 回答1: put bootstrap-sass in the assets group of the Gemfile group :assets do gem 'sass-rails', '~> 3.2.5' gem 'coffee-rails', '~> 3.2.2' gem 'uglifier', '>= 1.2.4' gem 'bootstrap-sass', '~> 2.0.3.1' end 回答2: I was being a bit ahead of myself, appears I hadn't run gem install bootstrap-sass yet...

How does bundler work (in general)?

六眼飞鱼酱① 提交于 2019-12-10 00:51:19
问题 I'm pretty new to Ruby/Rails but I was taking a look at bundler and was wondering how it works exactly. Do you install a full set of gems like normal gem install XYZ and then use the Gemfile to pull a certain subset of those gems for use with a specific application? Or do you not install gems normally anymore and just include them in the Gemfile and then do a bundle install to include them all in a bundle that is then used with your application? Thank you so much for taking the time to answer

irb loading wrong ruby and gem path, using rbenv

别说谁变了你拦得住时间么 提交于 2019-12-09 23:31:54
问题 I started using rbenv for ruby version management and I'm finding that irb not loading the correct ruby version and gem version. Here are the details. irb Gem.path says: `>> Gem.path => ["/Users/Air/.gem/ruby/1.8", "/Library/Ruby/Gems/1.8", "/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8"]` Now in irb if I type: puts $: `>> puts $: /Library/Ruby/Site/1.8 /Library/Ruby/Site/1.8/powerpc-darwin11.0 /Library/Ruby/Site/1.8/universal-darwin11.0 /Library/Ruby/Site

Failing to install Jekyll gem native extension on Windows with “multiple target patterns”

断了今生、忘了曾经 提交于 2019-12-09 20:39:48
问题 I'm trying to get Jekyll up and running on my Windows 7 machine, but installing the gem fails with a make exception. I'm basically following the instructions provided by Madhur Arhuja plus some "fixes" due to some seemingly wrong links. Here is what I did: Downloaded and installed ruby 1.9.3 p448 Downloaded and extracted the RubyDevelopmentKit from the same page. In my Git Bash from the directory where I installed the development kit I ran ruby dk.rb init ruby dk.rb install gem install jekyll

Install a gem to node project on Heroku

天大地大妈咪最大 提交于 2019-12-09 19:05:01
问题 I would like to install a gem to my node project, which is hosted on Heroku. More specifically I would like to use Sass with Compass, and Compass is only available as a gem. There are projects that wrap this gem for node, but all of them require the gem. Is there a way to do this? There's already this topic (Installing gems on node heroku projects), but it hasn't received any replies. 回答1: I got a reply from Heroku. " You would need to use the heroku multi buildpack in order to have both the

Ruby / Rails: how can I create multiple records in salesforce with one API call via the rforce gem?

徘徊边缘 提交于 2019-12-09 18:31:53
问题 I'm using the rforce gem to create records in my salesforce database. The example for creating records in the rforce documentation is: opportunity = [ :type, 'Opportunity', :accountId, account_id, :amount, '10.00', :name, 'Fakey McFakerson', :closeDate, '2008-07-04', :stageName, 'Closed Won' ] binding.create :sObject => opportunity The salesforce API call create() allows for the creation of multiple object at once, but I'm struggling to accomplish this. I've tried the following call: binding

How do I make --no-ri --no-rdoc the default for gem install? [duplicate]

情到浓时终转凉″ 提交于 2019-12-09 15:28:49
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How to make --no-ri --no-rdoc the default for gem install? I never use ri nor rdoc and they take too long to install. Is there a config file somewhere that will let me do this 回答1: Just add gem: --no-ri --no-rdoc to your ~/.gemrc file 回答2: You're looking for the '.gemrc' config file. 回答3: you can alias your gem command for something like alias geminst='gem install --no-ri --no-rdoc' 回答4: Under Windows XP the