rubygems

Error with autotest in ruby on rails

梦想的初衷 提交于 2019-12-10 15:15:56
问题 I ran the command autotest and this is the error I got . I am following Hartl's book and was wondering is this clash happening because rails now comes with ZenTest or something else ? How can I work past this error. I am new to RoR Invalid gemspec in [/Users//.rvm/gems/ruby-1.9.2-p320@twitclone/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"] Invalid gemspec in [/Users//.rvm/gems/ruby-1.9.2-p320@twitclone/specifications/ZenTest-4.8.4.gemspec]: Illformed

rake release hangs when releasing a gem

血红的双手。 提交于 2019-12-10 15:10:34
问题 I'm trying to release my first gem to Ruby Gems. The gem is working great locally. I'm releasing it using: $rake release Which gives me this in the console: example_gem 0.0.3 built to pkg/example_gem-0.0.1.gem Tagged v0.0.1 Pushed git commits and tags Then the process hangs. I waited 20 mins, then cancelled. When I tried to release again I got: rake aborted! This tag has already been committed to the repo. So I assumed the gem had been successfully submitted, however 16 hours later, the gem

No source for ruby-1.9.2-p321 provided with debugger-ruby_core_source gem

不羁岁月 提交于 2019-12-10 14:39:30
问题 I recently updated to Mavericks. Added Command Line tools for xcode. Tried "bundle update debugger", along with every other fix I found, including this rake add_source to include the appropriate header found here:http://sponsorpay.github.io/blog/2012/06/11/ruby-debugger-and-no-source-for-ruby-error/, and I still cannot push my project to heroku without errors. Any help is appreciated. Thanks in advance. Update: Found this but not sure how to do it. "Gems such as debugger-linecache require

Problems installing Ruby gem “ffi” on Ubuntu Server 12.04

南楼画角 提交于 2019-12-10 14:07:37
问题 I'm trying to use bundle to install gems required for my new project, but I'm having trouble installing version 1.1.5 of the 'ffi' gem. I'm using Ruby 1.9.3 running on a virtualised install of 64-bit Ubuntu Server 12.04. When running the bundle command, I receive the following error message: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /home/alex/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb checking for ffi.h... no checking for ffi.h in /usr/local

Evaluate javascript on Ruby

别说谁变了你拦得住时间么 提交于 2019-12-10 13:46:57
问题 I tried get code html of a web page, but the web contains some javascript code that generates some data that I need. http = Net::HTTP.new('localhost') path = '/files.php' # POST request -> logging in data = '' headers = { 'Referer' => 'http://localhost:8080/files.php', 'User-Agent' => 'Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0', 'Accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Accept-Language' => 'es-ES,es;q=0.8,en-US;q=0.5,en;q=0

How access Google Contacts using OpenID in Ruby

蓝咒 提交于 2019-12-10 13:34:18
问题 I am using devise to login with omniauth, authid. When the user is logged in I get user_info: name: Riccardo Tacconi last_name: Tacconi email: email@gmail.com first_name: Riccardo uid: https://www.google.com/accounts/o8/id?id=xxxxxxxxx provider: google_apps I have found a plug-in: http://stakeventures.com/articles/2009/10/06/portable-contacts-in-ruby to get the Google Contacts. I only need to use this method: @client = PortableContacts::Client.new "http://www-opensocial.googleusercontent.com

How to use hooks in ruby gems

你离开我真会死。 提交于 2019-12-10 12:50:54
问题 I have a gem which needs some rake task to be executed after installation of the gem. There is a hackish way to execute a code after install using method described at http://blog.costan.us/2008/11/post-install-post-update-scripts-for.html. However Gem class now has hooks, and one of them is a post_install hook. I am trying to add a line like Gem.post_install { puts 'post hook example' } into Rakefile and it does not seem to be executed during install. Where should this line to be placed for

bundle update fails : marshal data too short

折月煮酒 提交于 2019-12-10 12:45:49
问题 $ bundle update Fetching gem metadata from http://rubygems.org/..Unfortunately, a fatal error has occurred. Please see the Bundler troubleshooting documentation at http://bit.ly/bundler-issues. Thanks! /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/fetcher.rb:168:in `load': marshal data too short (ArgumentError) from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/fetcher.rb:168:in `fetch_dependency_remote_specs' from /Users

Installing rmagick 2.13.1 with graphicsmagick on Ubuntu 10.04

≡放荡痞女 提交于 2019-12-10 12:32:50
问题 I previously had an rmagick gem installation that works with ImageMagick. ImageMagick was installed from source with OpenMP disabled. This installation works without a hitch. However I attempted to uninstall rmagick and ImageMagick so that I could have a version that works with GraphicsMagick. So I installed GraphicsMagick from source and disabled OpenMP feature once again. However, When I install rmagick I get the following: Building native extensions. This could take a while... ERROR: Error

Thin/eventmachine non-root installation problem

杀马特。学长 韩版系。学妹 提交于 2019-12-10 12:24:21
问题 Trying to run ruby on rails framework under nginx+thin, currently working under WEBrick. I don't have root access, cause it is hosted at web hosting service. Till this moment all problems with gems solved w/o root access. thin requires eventmachine, so: $ gem install eventmachine Building native extensions. This could take a while... ERROR: Error installing eventmachine: ERROR: Failed to build gem native extension. /usr/local/bin/ruby18 extconf.rb checking for rb_trap_immediate in ruby.h