rubygems

Phusion error: undefined method `has?' for Sass::Util:Module

折月煮酒 提交于 2019-12-23 09:04:11
问题 I get the following error issued by Phusion when loading a web page: There was an error while trying to load the gem 'compass-rails'. Gem Load Error is: undefined method `has?' for Sass::Util:Module Did you mean? hash Hash Backtrace for gem load error is: /Volumes/Data/htdocs/zetcho/vendor/bundle/gems/compass-0.12.2/lib/compass/sass_extensions/functions/urls.rb:5:in `has?' The code at the indicated location is: module Compass::SassExtensions::Functions::Urls def self.has?(base, instance

Programmatically check if gem in bundle?

人走茶凉 提交于 2019-12-23 08:53:48
问题 At runtime, after bundler setup is complete, and groups are applied, what is the best way to programmatically check if a given gem_name is in the bundle? By reading the source, I've discovered Bundler.definition, e.g. gem_name = 'banana' Bundler.definition.dependencies.map(&:name).include?(gem_name) but unable to find documentation 1 , I don't know if this is the recommended usage. Update: It looks like Bundler::Definition#dependencies returns all dependencies, irrespective of groups. As an

Query dependency list from within a rails app

会有一股神秘感。 提交于 2019-12-23 04:53:42
问题 From a running rails app is there a way to enumerate the list of dependencies for the application? Assume I don't have access to the Gemfile or Gemfile.lock files. I need the gem name and the version number so something like: [["actionmailer" "3.1.3"] ["coffeescript" "2.0.2"]] 回答1: Assuming bundler, which you should use, you can access it like this: Bundler.environment.current_dependencies #=> [<Bundler::Dependency type=:development name="minitest" requirements=">= 2.11.0">, <Bundler:

Macports and Rubygems issues on Snow Leopard

元气小坏坏 提交于 2019-12-23 04:52:52
问题 I've installed Snow Leopard over Leopard with macports and rubygems already installed. This was regular install, not a clean "archive and erase" install. It turned out, that SL has 64bit versions of shared libraries and many development utilities do not work. For example, "port" command complains on incompatible tcl library, or ruby cannot load 32bit bundles. What is the easiest way to solve these issues? 回答1: I was googling for the answer for about 4 days already and finally came up with a

Using Gems with Ruby On Rails: Undefined method?

Deadly 提交于 2019-12-23 04:47:34
问题 There's this snazzy captcha that asks questions rather than displaying pictures. You can read about it at textcaptcha.com. Anyway. I want to use that with Ruby on Rails. A developer by the name of Matt Hutchinson wrote a Gem for easily connecting to the API. He has a set of instructions next to his source files on github. Anyway, It looks pretty simple but in trying to implement it I get this error every time: undefined method `acts_as_textcaptcha' for #<Class:0x104098508> Rails.root: /Users

Web application could not be started Passenger Error (Apache2) - Referencing Non-Existing Ruby Patch

孤人 提交于 2019-12-23 04:43:38
问题 I have been having problems after updating from p247 to the latest patch for Ruby 2.0.0 (P353) using the latest version of RVM. Here is the link to my original question where I was experiencing a missing RVN environment file for the old patch which was no longer in my system. RVM was corrected and that problem disappeared. ERROR: Missing RVM environment file After Doing rvm upgrade command - Passenger 4.0.23 I went ahead and installed the latest version of Passenger 4.0.29 using the gem file

`require': cannot load such file — rubygems.rb when installing ruby and rubygems with rvm

牧云@^-^@ 提交于 2019-12-23 03:23:05
问题 I was trying to create a fresh installation of Ruby and Rubygems using RVM on Ubuntu 13.10. I had already had an installation before which somehow got corrupted. I decided to reinstall everything, so I ran rvm implode which seemed to delete all traces of ruby and rubygems. However, after reinstalling it using \curl -L https://get.rvm.io | bash -s stable --ruby source /home/<username>/.rvm/scripts/rvm when I run gem install rails , i get the following error: <internal:gem_prelude>:1:in

`require': cannot load such file — rubygems.rb when installing ruby and rubygems with rvm

跟風遠走 提交于 2019-12-23 03:23:00
问题 I was trying to create a fresh installation of Ruby and Rubygems using RVM on Ubuntu 13.10. I had already had an installation before which somehow got corrupted. I decided to reinstall everything, so I ran rvm implode which seemed to delete all traces of ruby and rubygems. However, after reinstalling it using \curl -L https://get.rvm.io | bash -s stable --ruby source /home/<username>/.rvm/scripts/rvm when I run gem install rails , i get the following error: <internal:gem_prelude>:1:in

Error loading rubygems

醉酒当歌 提交于 2019-12-23 02:52:41
问题 During an operation (rspec related) that required loading rubygems (from config/boot.rb file) I got the following error message: ~/config/boot.rb:1:in `require': no such file to load -- rubygems (LoadError) ~/config/boot.rb:1 from ~/config/application.rb:1:in `require' from ~/config/application.rb:1 from ~/config/environment.rb:2:in `require' from ~/config/environment.rb:2 from ~/spec/spec_helper.rb:3:in `require' from ~/spec/spec_helper.rb:3 from ~/spec/models/user_spec.rb:1:in `require'

Fenced codeblocks in Jekyll

这一生的挚爱 提交于 2019-12-23 02:34:23
问题 I have just upgraded my local Jekyll installation to Jekyll 3.0.2. I was looking forward to use fenced (backticks) code blocks when posting source code. This however doesn't work, and I still have to use Liquid tags to specify codeblocks My build settings in _config.yml: baseurl: / destination: _site permalink: pretty markdown: kramdown kramdown: input: GFM syntax_highlighter: rouge List of Ruby gems installed activesupport (4.2.5.1) addressable (2.3.8) bigdecimal (1.2.6) bundler (1.11.2)