rubygems

conflicting ruby gems

妖精的绣舞 提交于 2019-12-19 17:38:15
问题 I need to use two gems in my project that both claim the PDF namespace: pdf-reader and htmldoc. Is there any way to get them to play nice together? The only way I can think of is to rewrite my own version of htmldoc to give it a different namespace. 回答1: There's probably no elegant solution to the problem. If you really need the two gems working side by side I think your best option is to fork one of them (or possibly both) and use your fork. This is how I'd go about it: If either gem is

open-uri is not redirecing http to https

为君一笑 提交于 2019-12-19 13:12:07
问题 I am using Hpricot and OpenURI to parse webpages and extract URLs from them. When I get a link like "http:rapidshare.com", it is not redirecting to https. This is the error I got: /home/leonidus/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/open-uri.rb:216:in `open_loop': redirection forbidden: http:.................=> https:......................... . . I tried to use the exception handler OPENURI::HTTPREDIRECT but then again I am getting the same error. I tried all the blogs but it is not

open-uri is not redirecing http to https

时光毁灭记忆、已成空白 提交于 2019-12-19 13:12:03
问题 I am using Hpricot and OpenURI to parse webpages and extract URLs from them. When I get a link like "http:rapidshare.com", it is not redirecting to https. This is the error I got: /home/leonidus/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/open-uri.rb:216:in `open_loop': redirection forbidden: http:.................=> https:......................... . . I tried to use the exception handler OPENURI::HTTPREDIRECT but then again I am getting the same error. I tried all the blogs but it is not

Ruby on Rails, nginx, passenger on production server (cannot load such file — rubygems/path_support)

為{幸葍}努か 提交于 2019-12-19 10:43:27
问题 I installed: Centos 6 Ruby 1.9.3-rc1 Passenger gem and passenger nginx module ( compiled against own source 1.1.6) Installed rails 3.1.0 Made /srv Did rails new test bundle install made vhost for passenger inside nginx based on example /srv/test/public service nginx stop && service nginx start ruby app loads okay index.html is shown but then... Upon Clicking the "check application environment" link that is inside the default /public/index.html I get this error cannot load such file --

How can I make a Ruby gem package copy files to arbitrary locations?

时光总嘲笑我的痴心妄想 提交于 2019-12-19 08:54:10
问题 Suppose you have a software package. You want to make it a gem, because gems are the de facto standard way to distribute anything in the Ruby world. Gems are great -- for libraries. But for real applications, the Rubygems system seems lacking. Only "recently" did they introduce a way to mark executables to be placed in somewhere in the system wide executable PATH. Unfortunately, Ruby gems still seems to be wanting in other aspects of software packaging, namely putting configuration files in

Background Job Manager for Rails 3

荒凉一梦 提交于 2019-12-19 07:57:16
问题 Does anyone know of a background job manager that works with Rails 3? I have heard of Starling and Workling but I do not see a fork for Rails 3. 回答1: I used this article to get delayed_job (a common rails 2 gem for queueing jobs to be done later) running on rails 3. The collectiveidea branch of delayed_job has rails 3 support and works great. 回答2: Are you looking for a background-job worker ? for simple usage i suggest delayed_job https://github.com/collectiveidea/delayed_job/ Resque instead

Is it possible to override gemfile for local development?

强颜欢笑 提交于 2019-12-19 07:35:47
问题 We have a Gemfile currently in our git repository. However, there's a gem I use only locally in my environment (my team doesn't use it). In order to use it, I have to add it to our Gemfile , but every time I check out to our master/dev main branch, I have to remove it because of conflicts with the tracked gemfile. What I would like is something like a Gemfile.local which would inherit the gems imported from the Gemfile but to also allow new gems to be imported there to use on my machine only.

Is it possible to override gemfile for local development?

我们两清 提交于 2019-12-19 07:35:06
问题 We have a Gemfile currently in our git repository. However, there's a gem I use only locally in my environment (my team doesn't use it). In order to use it, I have to add it to our Gemfile , but every time I check out to our master/dev main branch, I have to remove it because of conflicts with the tracked gemfile. What I would like is something like a Gemfile.local which would inherit the gems imported from the Gemfile but to also allow new gems to be imported there to use on my machine only.

Is it possible to override gemfile for local development?

放肆的年华 提交于 2019-12-19 07:35:02
问题 We have a Gemfile currently in our git repository. However, there's a gem I use only locally in my environment (my team doesn't use it). In order to use it, I have to add it to our Gemfile , but every time I check out to our master/dev main branch, I have to remove it because of conflicts with the tracked gemfile. What I would like is something like a Gemfile.local which would inherit the gems imported from the Gemfile but to also allow new gems to be imported there to use on my machine only.

ruby on rails installing JSON ubuntu error

余生长醉 提交于 2019-12-19 07:21:59
问题 Hey I am new to rails (as well as linux) and I keep getting this error: Installing json (1.7.5) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /usr/bin/ruby1.9.1 extconf.rb /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from extconf.rb:1:in `<main>' Gem files will remain installed in /home/jack/.bundler/tmp