rubygems

therubyracer error on heroku as “Failed to install gems via Bundler.”

扶醉桌前 提交于 2019-12-10 17:18:04
问题 When i push my app to heroku it gives me following error -----> Ruby/Rails app detected -----> Installing dependencies using Bundler version 1.3.2 Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment You are trying to install in deployment mode after changing your Gemfile. Run `bundle install` elsewhere and add the updated Gemfile.lock to version control. You have added to the Gemfile: * therubyracer ! ! Failed to install gems via

RVM error when installing gems

℡╲_俬逩灬. 提交于 2019-12-10 17:15:49
问题 I get this RVM error when I install rubygems. /Users/yannick/.rvm/gems/ruby-1.9.2-p290/gems/yard-0.7.3/lib/yard.rb:38: [BUG] Bus Error ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.1.0] -- control frame ---------- c:0019 p:---- s:0074 b:0074 l:000073 d:000073 CFUNC :callcc c:0018 p:0080 s:0071 b:0071 l:000a40 d:000a40 TOP /Users/yannick/.rvm/gems/ruby-1.9.2-p290/gems/yard-0.7.3/lib/yard.rb:38 c:0017 p:---- s:0068 b:0068 l:000067 d:000067 FINISH c:0016 p:---- s:0066 b:0066 l

Invalid spec cache file

前提是你 提交于 2019-12-10 17:15:20
问题 I have ruby 2.0.0p247 [x64-mingw32] with Gem 2.2.2 installed on Windows 8. I have a persistent problem gem that is making it virtually unusable. Whenever I try to install a new gem, I invariably get: ERROR: While executing gem ... Invalid spec cache file in C:/Users/... In the past, I've been able to run gem update or gem update --system and that would clear up the problem for one, single gem install . Subsequent install would fail with the same error. Now even gem update fails with that

Rails can't find the module, if config.cache_classes = true

雨燕双飞 提交于 2019-12-10 17:14:39
问题 I have a gem which is mounted as engine in my rails app via routes.rb & Gemfile . Here are the important pieces: Apps' Gemfile source 'https://rubygems.org' gem 'rails', '3.2.9' gem 'mysql2' group :assets do gem 'sass-rails' gem 'coffee-rails' end gem 'jquery-rails' gem "common_client", path: "../common-client" App's routes.rb mount CommonClient::Engine => "", :as => 'shared' gem's routes.rb get '/register' => 'session#new_registration' gems's SessionController require 'common_client/session

gem installed but 'rails' commands don't work

霸气de小男生 提交于 2019-12-10 16:58:07
问题 when I run any rails command like rails s I get the following error: Could not find diff-lcs-1.1.2 in any of the sources Try running bundle install . However, I already installed diff-lcs. bundle show diff-lcs /opt/local/lib/ruby1.9/gems/1.9.1/gems/diff-lcs-1.1.2 I also see diff-lcs when I do a gem list command My GEM_HOME is /opt/local/lib/ruby1.9/gems/1.9.1 For reference, here's the contents of my Gemfile: source 'http://rubygems.org' gem 'rails', '3.0.0' gem 'sqlite3-ruby', '1.2.5',

How to reference parent model from Carrierwave Uploader object

梦想的初衷 提交于 2019-12-10 16:55:52
问题 I want to run some methods after the upload of a file has been completed via Carrierwave. Carrierwave includes several callback methods detailed here. I'm planning on using the :store callback. That's great, but it requires me to run the callback method in the Uploader object instance. This isn't the end of the world, but I want to keep all the logic inside of my parent Model. My question is: How should I be referencing the parent model from the Uploader? I don't see anything obvious in the

Can I conditionally skip loading “further” ruby code in the same file?

試著忘記壹切 提交于 2019-12-10 16:46:03
问题 Can I conditionally skip loading "further" ruby code in the same file, if a library (loaded via require) is not found ? begin require 'aws-sdk' rescue LoadError puts "aws-sdk gem not found" return #does not work. nor does next end # code after here should not be executed as `aws-sdk` gem was not found puts "=== should not get executed" namespace :db do desc "import local postgres database to heroku. user and database name is hardcoded" task :import_to_heroku => [:environment, "db:dump_for

RubyMine doesn't recognize gem from git repository

时光总嘲笑我的痴心妄想 提交于 2019-12-10 16:40:15
问题 We have a git repository with a custom gem. To install it Gemfile has a line: gem 'my-gem', :git => 'git@192.168.1.100:my-gem.git' After installing the gem, it is not shown in RubyMine`s External Libraries. How to make the gem be shown in External Libraries and code from the gem be autocompleted? 回答1: We get this error as well, so it's probably a bug in RubyMine. A workaround is to check out that gem repo and tell bundler to use it. Note that the remote repository will not be used anymore.

unable to update gems on mac osx - Gem::RemoteFetcher::FetchError

一笑奈何 提交于 2019-12-10 16:35:09
问题 Jon-MacBook-Pro:rubygems-1.3.7 jon$ sudo gem install rails Password: ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) SocketError: getaddrinfo: nodename nor servname provided, or not known (http://rubygems.org/gems/activesupport-2.3.8.gem) 回答1: rubygems.org is down right now. Try again later. 来源: https://stackoverflow.com/questions/2995125/unable-to-update-gems-on-mac-osx-gemremotefetcherfetcherror

Nokogiri 1.5.2 not installing on Ubuntu 11.10

百般思念 提交于 2019-12-10 15:45:47
问题 Real quick, I am aware of a similar question. However, following the top rated answer does not work. I've already restarted my system and the terminal, but to no avail. For some reason, Nokogiri does not recognize that I have libxslt1-dev installed, though I explicitly installed it, both with sudo apt-get install libxslt-dev and sudo apt-get install libxslt1-dev . Here's the output; am I missing anything else? $ gem install nokogiri -v '1.5.2' Building native extensions. This could take a