gem

Rails 3.2.3 MySQL 5.5.1 Mysql2 gem install fails with ld incompatibilities

亡梦爱人 提交于 2020-01-02 07:42:14
问题 I have a clean build system as follows Ubuntu 11.04 Rvm 1.13.5 Ruby 1.9.3p194 Rails 3.2.3 Gem 1.8.24 MySql 5.5.24-1 (installed in /usr/local) I am trying to install the mysql2 gem (0.3.11) and getting the following problem: pal@smurf01:~$ sudo gem install mysql2 [sudo] password for pal: Building native extensions. This could take a while... ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. /usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb checking for rb

gem install autotest-fsevent failing after update to macosx mavericks

梦想与她 提交于 2020-01-02 07:32:28
问题 After update to Maveriks having problems installing gem autotest-fsevent Here is the error I get; Mellon:public lasdolphin$ sudo gem install autotest-fsevent Building native extensions. This could take a while... ERROR: Error installing autotest-fsevent: ERROR: Failed to build gem native extension. /Users/lasdolphin/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb extconf.rb:24:in `<main>': Darwin 13 is not (yet) supported (RuntimeError) Gem files will remain installed in /Users/lasdolphin/

gem install autotest-fsevent failing after update to macosx mavericks

本小妞迷上赌 提交于 2020-01-02 07:31:34
问题 After update to Maveriks having problems installing gem autotest-fsevent Here is the error I get; Mellon:public lasdolphin$ sudo gem install autotest-fsevent Building native extensions. This could take a while... ERROR: Error installing autotest-fsevent: ERROR: Failed to build gem native extension. /Users/lasdolphin/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb extconf.rb:24:in `<main>': Darwin 13 is not (yet) supported (RuntimeError) Gem files will remain installed in /Users/lasdolphin/

How to best parse a javascript parsed JSON content into ruby

拜拜、爱过 提交于 2020-01-02 07:08:24
问题 I have a javascript file I use for my javascript app that I would like to read in and parse with ruby. The content of this file is not a stringified JSON, rather a javascript parsed JSON data structure. I.E. if my ruby code is require 'rubygems' require 'json' file = File.open("testing.js", 'r') json = file.readlines.to_s hash = JSON.parse(json) my testing.js is { color:"blue" } which will fail if I try to read it in... JSON::ParserError: 751: unexpected token at '{ color:"blue" }' if will

Ruby/rails: mongoid with mongo(gem); a bson conflict? How to handle different versions?

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-02 06:57:26
问题 How to handle gem version mis-matches? Mongoid 4.0.0 (latest) uses moped (2.0.0) which requires bson 2.3 Mongo 1.10.2 (latest) uses bson 1.10.2 I can't use mongoid 4.0.0 and mongo 1.10.2 together, but I could in the past, when mongoid uses bson 1.x. Does anyone know how I can continue forward using both mongo and mongoid? -daniel Links: https://rubygems.org/gems/mongoid https://rubygems.org/gems/moped https://rubygems.org/gems/mongo 回答1: The latest unstable version 2.x (under heavy

gem is very slow

随声附和 提交于 2020-01-02 06:32:10
问题 On my server searching is fast but on my local machine gem searches are slow. Can I do something for speed up my gem searches? 回答1: The solution from Doc Snuggles really works. But it should be notice that your gem command maybe living in a gemset, that is: rvm info | grep gem will tell you where the gem script lives. Then edit it and add the magic line before any other require : require 'resolv-replace' 回答2: Maybe you could try this: In gem (mine’s at /usr/local/bin/gem), add this line

Paper_trail gem abilities

a 夏天 提交于 2020-01-02 06:21:59
问题 I was wondering whether the following use case can be achieved using the papertrail gem? A Wikipedia-type of application with wiki pages that logged in users can change/edit and where: Moderators can undo specific changes: I understand papertrail allows to roll back to a previous version but what I’m asking here is somewhat different. That is, the ability to undo a specific edit/change . Suppose there have been three edits/versions to a record/wiki-page. Then if you want to undo edit 2, then

Installing Publify with bundle install, error on bluecloth gem

早过忘川 提交于 2020-01-02 04:09:52
问题 I'm trying to install Publify web blog CMS 6.0.9 for Ruby on Rails 3.1 on Windows. Every time I try to bundle install Publify, I get the same error message when installing the bluecloth gem: C:\Users\Lunasea\Downloads\typo-6.0.9>gem install bluecloth Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing bluecloth: ERROR: Failed to build gem native extension. C:/RailsInstaller/Ruby1.9.2/bin/ruby.exe extconf.rb checking

Embedding youtube video in markdown?

家住魔仙堡 提交于 2020-01-02 00:57:10
问题 i use the ruby gem formatize to parse my markdown-formated text. now i want to embed a youtube-video into the markdown text, but whenever i add the iframe snippet, the gem (or markdown?) just removes it from the output. any advise? thanks! 回答1: You'll have to get formatize to ignore <iframe> tags. See this link. You can have markdown + HTML together so it sounds like it's an issue with the gem. Notice how the markdown syntax recommends that the older YouTube markup is embedded via direct HTML

What gem can I use to generate a HTML file for offline use?

瘦欲@ 提交于 2020-01-01 22:15:14
问题 I have to create a report, and in order to do some colouring and tables, I decided on HTML. Is there any gem I could use to do this? I'd like to avoid having to write the tags myself. 回答1: You can take a look at Markaby which lets you generate HTML through a Ruby DSL. An example from the official docs: require 'markaby' mab = Markaby::Builder.new mab.html do head { title "Boats.com" } body do h1 "Boats.com has great deals" ul do li "$49 for a canoe" li "$39 for a raft" li "$29 for a huge boot