rubygems

Issues installing CocoaPods

微笑、不失礼 提交于 2019-12-06 20:26:01
问题 I'm trying to get CocoaPods set up in OSX (I'm running 10.8.2) - so I run sudo gem install cocoapods It succeeds and I get - 'Successfully installed cocoapods-0.17.2 1 gem installed' Then...I try pod setup '-bash: pod: command not found ' How do I get command line to recognize this command? 回答1: Quitting and restarting Terminal fixed it for me. Actually, I just opened a new tab in Terminal. 回答2: I had the same problem, running Mountain Lion with Ryby 2 installed and being used instead of the

Is it possible to define composite primary key for table using active record? [duplicate]

旧巷老猫 提交于 2019-12-06 20:17:37
问题 This question already has answers here : How to set composite key in Rails application (2 answers) Closed 5 years ago . I'm using ActiveRecord in a ruby project without rails. I need to define composite primary key for a table.Normally migration creates primary key automatically. Is it possible to define my own composite primary key for a table using active record? 回答1: There are some gems that give you this ability, such as composite_primary_key. I don't know if Rails 4 has added support for

RubyGems error after updating system

不羁岁月 提交于 2019-12-06 20:10:17
问题 When trying to launch the rails console after updating my ruby setup using 'sudo gem update --system', I then try execute the rails console by issuing rails c I get this error: Users/myusername/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find json (~> 1.4) amongst [Ascii85-1.0.1, abstract-1.0.0, actionmailer-3.1.1, actionmailer-3.1.0, actionmailer-3.0.9, actionmailer-3.0.5, actionmailer-3.0.3, actionpack-3.1.1, actionpack-3.1.0,

rvm conflit with sqlite3

丶灬走出姿态 提交于 2019-12-06 19:42:30
问题 $: /Users/dev/.rvm/gems/ruby-1.9.2-head@rails3/gems/sqlite3-ruby-1.3.1/lib/sqlite3/sqlite3_native.bundle: [BUG] Segmentation fault ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0] Abort trap It's seem that ruby is not the correct version (1.8.7) but : $: ruby - v $: ruby 1.9.2dev (2010-07-15 revision 28653) [x86_64-darwin10.4.0] $: gem list *** LOCAL GEMS *** abstract (1.0.0) actionmailer (3.0.0.beta4, 3.0.0.beta3) actionpack (3.0.0.beta4, 3.0.0.beta3) activemodel (3.0.0.beta4, 3

mysql2 failing bundle install

吃可爱长大的小学妹 提交于 2019-12-06 19:20:32
I've been hung up on this issue for hours now and nothing I have found previously posted about this issue seems to work. Below is the mysql2 output for when I run bundle install : Fetching mysql2 0.4.5 Installing mysql2 0.4.5 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /Users/MYUSERNAME/Desktop/MY_PROJECT/vendor/ruby/2.4.0/gems/mysql2-0.4.5/ext/mysql2 /Users/MYUSERNAME/.rbenv/versions/2.4.2/bin/ruby -r ./siteconf20180623-40170-ndn6t0.rb extconf.rb --with-mysql-config=/usr/local/Cellar/mysql/8.0.11/bin/mysql_config checking for rb

Bundle install error: Source does not contain any versions of

≡放荡痞女 提交于 2019-12-06 18:33:08
问题 My gem file contains: gem "breadcrumb", :git => "git@github.com:mjacobus/Breadcrumb.git" gem "simple_menu", :git => "git@github.com:mjacobus/simple_menu.git" The first gem installs as expected, but the second one fails. Updating git@github.com:mjacobus/simple_menu.git Fetching gem metadata from https://rubygems.org/........ Could not find gem 'simple_menu (>= 0) ruby' in git@github.com:mjacobus/simple_menu.git (at master). Source does not contain any versions of 'simple_menu (>= 0) ruby'

How to install SystemTimer on 1.9.2?

梦想的初衷 提交于 2019-12-06 18:02:56
问题 I've just upgraded my app from 1.8.7 to 1.9.2 using RVM and had to add RubyGems and Bundler, ran bundle install and got everything to work except SystemTimer. Google-fu returns nothing and I see others have had issue with it in 1.9 but some have gotten it to work. Any ideas? pawel:bodb pawel$ sudo gem install SystemTimer Building native extensions. This could take a while... /Users/pawel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/ext/builder.rb:48: warning: Insecure world

Bundler: how to use without rails?

不想你离开。 提交于 2019-12-06 17:13:30
问题 I have a project using cucumber outside of rails. How can I load the gems with the versions specified in my gemfile? 回答1: Digging through the Bundler website: Create Gemfile (run bundle init to create skeleton Gemfile ) bundle install In your app: # Only needed for ruby 1.8.x require 'rubygems' # The part that activates bundler in your app require 'bundler/setup' # require your gems as usual require 'some_gem' # ...or require all the gems in one statement Bundler.require Could be worth

Local Dependency in Gem .gemspec

不打扰是莪最后的温柔 提交于 2019-12-06 17:01:11
问题 I am working on a gem (Gem A) which uses another gem (Gem B) that I have also written. Until this point Gem B has been added in the gemspec for Gem A: gem.add_dependency "gem_a", "~> 0.0.4" But I now find the need to debug using my local version. To declare a local dependency in a Gemfile I could do: gem 'gem_a', path: "/local/path/to/gem_a" But how do I declare a local dependency in a .gemspec ? 回答1: Just so folks can find the answer (slightly) faster... If you're creating a gem, and need to

Can't install mysql2 for rails 3 on Windows

自古美人都是妖i 提交于 2019-12-06 16:53:50
问题 Can't install mysql2 without an error message. I've tried every way I can think of including using devkit. gem install mysql2 -- --with-mysql-include=c:/xampp/mysql/inclu de --with-mysql-lib=c:/xampp/mysql/lib --with-mysql-config=c:/xampp/mysql/bin/my sql_config Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. C:/RailsInstaller/Ruby192/bin/ruby.exe extconf.rb -