gem

Ruby not installing json -v 1.8.1 as part of bundle, ERROR: Failed to build gem native extension

你离开我真会死。 提交于 2019-12-12 04:45:14
问题 I've tried installing using as part of the bundle and using sudo, but I get the same error message every time. I'm currently on Ruby 2.0.0 and Rails 4.1.8 . I'm not sure what is going on. The exact error message below: Fetching gem metadata from https://rubygems.org/.......... Resolving dependencies... Using rake 10.4.2 Using i18n 0.6.11 Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20141218

Html to Pdf gem

纵饮孤独 提交于 2019-12-12 04:38:33
问题 I have a view that contains html with embedded svg and what I want to do is make the user able to save the view as a pdf file on their local machine so I need a gem that converts from html that has embedded svg code to pdf. Any suggestions ? 来源: https://stackoverflow.com/questions/15913113/html-to-pdf-gem

“undefined symbol: rb_Digest_MD5_Init” while running Rails

允我心安 提交于 2019-12-12 03:58:41
问题 I am trying to run Ruby On Rails, but every time I start it (even if I run rails without arguments, when it should display some help) it produces an error: serge1peshcoff@myLaptop:~$ rails /home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': /home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/x86_64-linux/digest/md5.so: undefined symbol: rb_Digest_MD5_Init - /home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0

ssl_requirement alternative gems

扶醉桌前 提交于 2019-12-12 03:48:41
问题 I checked out the gem called ssl_requirement which enforces SSL on certain actions and enhances the url and path helpers, it seems promising overall but it's too outdated and not quite well maintained. Does anyone know any updated alternatives that provide such convenience: Require SSL in controllers not in routes file. Automatically choose https:// on URL and Path helpers without having to ruin the code with: :protocol => 'https' ? Ability to disable the whole SSL enforcement in development

Ruby on rails tutorial : route_url and HTML - I am stock

依然范特西╮ 提交于 2019-12-12 03:23:40
问题 I am a total novice (Please read my profile) and started following a Ruby on Rails tutorial but am stock half way. The tutorial is here http://12devs.co.uk/articles/writing-a-web-application-with-ruby-on-rails/ Halfway the page, it started introducing devise gem. Which I installed without a problem. I followed the instructions up to "Devise also told us to check five steps to complete the setup:" I don't understand what to do / where to add the following steps 1)define a root_url in config

ERROR: Repository not found message given when following the instructions for Jekyll-Bootstrap

做~自己de王妃 提交于 2019-12-12 03:23:36
问题 Github pages not working for me when using Jekyll-Bootstrap. I followed the instructions here: http://jekyllbootstrap.com/ The instructions say: $ git clone https://github.com/plusjade/jekyll-bootstrap.git USERNAME.github.com $ cd USERNAME.github.com $ git remote set-url origin git@github.com:USERNAME/USERNAME.github.com.git $ git push origin master I used the personalized install code (means my github name rather than "USERNAME") I get this error when I try to do the last "$ git push origin

Rubygems blocked by Norton DNS

∥☆過路亽.° 提交于 2019-12-12 03:05:08
问题 I ran $ gem fetch -V github-linguist GET http://rubygems.org/latest_specs.4.8.gz 302 Moved Temporarily GET http://production.s3.rubygems.org/latest_specs.4.8.gz 200 OK ERROR: While executing gem ... (Zlib::GzipFile::Error) not in gzip format then to my shock I opened the link in my browser and see this message Norton DNS Malicious Web Site Blocked You attempted to access: production.s3.rubygems.org This is a known malicious web site. It is recommended that you do NOT visit this site. This

How to keep my gem self-contained without having to edit any core source Rails?

北城余情 提交于 2019-12-12 02:59:39
问题 I want to add a filter to the ApplicationController but I want to do it within my gem. What I want to avoid is the following: class ApplicationController < ActionController::Base include MyGem end I do not want that. I don't want to have to include my module in the source code. I am having issues though. Here is the relevant code: lib/correlation_id/controller_extension module CorrelationId module ControllerExtension def self.included(klass) klass.class_eval do after_filter :pass_correlation

Require “open-url” load error when executing Nokogiri tester

拥有回忆 提交于 2019-12-12 02:58:36
问题 I am trying to follow the RailsCast to use Nokogiri. Just a few very basic lines in my testing script file: require 'rubygems' require 'nokogiri' require 'open-url' url = "http://www.walmart.com/search/search-ng.do?search_constraint=0&ic=48_0&search_query=Batman&Find.x=0&Find.y=0&Find=Find" doc = Nokogiri::HTML(open(url)) puts doc.at_css("title").text But when I execute it, I run into an error: /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb

How can I increase a field in a rails gem?

社会主义新天地 提交于 2019-12-12 02:57:59
问题 I'm getting this error: SQL (31.1ms) INSERT INTO "read_marks" ("readable_id", "readable_type", "timestamp", "user_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["readable_id", nil], ["readable_type", "PublicActivity::ORM::ActiveRecord::Activity"], ["timestamp", Mon, 04 Mar 2013 03:29:52 UTC +00:00], ["user_id", 2]] PG::Error: ERROR: value too long for type character varying(20) Because "readable_type" only holds 20 characters, and I'm passing in "PublicActivity::ORM::ActiveRecord::Activity".