rubygems

How do I debug why a gem install fails?

你离开我真会死。 提交于 2019-12-08 15:59:27
问题 I'm trying to install geoutm using gem install geoutm . The Github repository doesn't have an issues page, so I'm trying to fix the issue myself then submit a pull request. This is the issue: $ gem install geoutm Fetching: geoutm-1.0.1.gem (100%) Successfully installed geoutm-1.0.1 ERROR: While executing gem ... (TypeError) no implicit conversion of Array into String It says "successfully installed", but trying to require the gem fails. Verbose install isn't much more useful: $ gem install

Is there a risk of a Ruby gem acting like a trojan?

耗尽温柔 提交于 2019-12-08 15:13:12
问题 I was just about to install a Ruby gem by someone I hadn't heard of. But something made me think "Who is this guy?". Is there any risk of a Ruby gem accessing private data on your machine and transmitting it elsewhere - since the gem system has Internet access? Or are there protections against this? 回答1: Of course there is. You're installing software on your computer that runs with the privileges of the script/user that calls it. It's probably easier to spot malicious code in pure Ruby than

What is a “circular argument reference” error, with activesupport time_zone?

给你一囗甜甜゛ 提交于 2019-12-08 14:39:57
问题 I'm new in ruby on rails, and I am trying to create a tutorial. I have a problem when I execute rake db:migrate . hugo@ubuntu:~/pin_board$ rake db:migrate /home/hugo/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.5/lib/active_support/values/time_zone.rb:283: warning: circular argument reference - now What causes this? Can somebody help me? 回答1: You see this warning message because your Rails version is 4.0.5. The issue has been fixed on Rails 4.0.6. Update your Gemfile and run bundle update

How do I use Haml in a view in my new plugin?

纵饮孤独 提交于 2019-12-08 13:09:25
问题 I'm creating a new plugin for a jruby on rails application that will eventually be turned into a gem. Inside my plugin I have controllers, helpers and views. For my views I'd like to use Haml. The problem is that I can't seem to get it to recognize that they are haml templates. Is it even possible to do this? Is there a way for a plugin to have Haml as a dependency for its view? And by that I mean, I intend for the plugin that I'm creating to have a view created by the plugin, that can be

RedCloth makefile error when trying to run bundle install for Octopress

痞子三分冷 提交于 2019-12-08 13:01:45
问题 I've just pulled down Octopress from Git ( github.com/imathis/octopress.git octopress ) to my local machine, but when I try to run bundle install per the instructions, ( http://octopress.org/docs/setup/ ) I get a make error. I'm running version 3.2 of Xcode--do I need to update to 4.x from the Apple Developer site? I'm also running Ruby 1.9.2p180 per RVM. Do I need to run a more recent version? Here's the output when I try to run sudo gem install RedCloth: Building native extensions. This

SASS/compass path in config.rb causing problem on compile

有些话、适合烂在心里 提交于 2019-12-08 12:39:34
问题 When I compile my SCSS, I'm getting a "file not found" error that leads me to believe there is something wrong with my config.rb. The error from the command line includes part of the path twice as well as the ".." relative directory: File not found or cannot be read: C:/REALLY_LONG_PATH/C:/REALLY_LONG_PATH/../img/avatar.jpg The config.rb reads as follows: # Delineate the directory for our SASS/SCSS files (this directory) sass_path = File.dirname(__FILE__) # Delineate the CSS directory (under

best practices for transfering ruby gems collection from one machine to another

走远了吗. 提交于 2019-12-08 10:10:20
问题 i want to copy all of my gems from one machine (foo) to another (bar). both machines are identical except that foo has a bunch of gems installed and bar does not (bar cannot get onto the internet). i copied /usr/local/lib/ruby/gems from foo to bar, and now bar recognizes that the gems are installed. root@bar # gem list *** LOCAL GEMS *** keybox (1.2.1) rake (0.9.2.2) ... and so on if i try to run them from their native location, they work as expected root@bar # cd /usr/local/lib/ruby/gems/1.8

How to quickly initialize ruby project development environment?

与世无争的帅哥 提交于 2019-12-08 09:39:27
问题 How to specify gem dependencies in a way that user with only ruby, rake and rubygems installed could issue a single rake command to install all the dependencies required? Is it possible to use the same dependency specification when building gem with GemBuildTask? 回答1: It's actually pretty easy to set up a rake task that installs a bunch of gems: task :install_gems do require "rubygems" require "rubygems/dependency_installer" installer = Gem::DependencyInstaller.new [["rack"], ["merb-core", "1

Sqlite3 causing problems for bundle install and gem install

怎甘沉沦 提交于 2019-12-08 09:14:52
问题 Using Rails, whenever I try to do anything like "bundle install" or sudo gem install someGem, I get these same errors about sqlite3. I've tried both sudo port install sqlite3 +universal and sudo port install rb-sqlite3 +universal But neither has helped. Here is the error: cmu-435163:photoGlass dpieri$ sudo gem install taps Password: Building native extensions. This could take a while... ERROR: Error installing taps: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby

ruby strategy to convert floating point number with linguistics

南楼画角 提交于 2019-12-08 08:51:08
问题 So I'm writing what I thought was a simple .rb file to convert a float number into a string. The string returns my floating point number in words. So if I have 11.11 then I would have eleven dollars and eleven cents So far I've extended the float class which has worked alright. I'm having trouble with how to convert the 11 cents into eleven cents. en.numwords would kick back eleven point one one. I've thought about trying out a hash to solve my problem where 11=>eleven cents. Any thoughts how