gem

ruby on rails Mysql installation problem on ubuntu

半腔热情 提交于 2020-01-17 09:00:29
问题 Ubuntu 10.10 Everything worked fine untill i tried to install a plugin, something went very wrong with mysql2. I tried te remove and reinstall it with this result: gem install mysql2 Building native extensions. This could take a while... ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. /home/ruben/.rvm/rubies/ruby-1.9.2-p136/bin/ruby extconf.rb checking for rb_thread_blocking_region()... *** extconf.rb failed *** Could not create Makefile due to some reason,

Model from Gem is missing

空扰寡人 提交于 2020-01-16 17:31:26
问题 I am using mailboxer in my Rails 4 app. gem 'mailboxer' I recently updated it from 0.11 to 0.12.4 , it stopped working, and I cant figure out why. Now, I am getting the error: uninitialized constant Message I checked the gem's GitHub repo and it does have the Message model. I checked my local version of the gem and it matches up. Puma:mailboxer Jeff$ pwd /Users/Jeff/.rvm/gems/ruby-2.0.0-p247/gems/mailboxer-0.12.4/app/models/mailboxer Puma:mailboxer Jeff$ ls conversation conversation.rb

What are the pitfalls and solutions when setting up Rails/Mysql on Leopard?

て烟熏妆下的殇ゞ 提交于 2020-01-16 14:44:10
问题 I've been going stir crazy trying to install the ruby mysql gem here, and I'm writing here so if anyone else is in this ridiculous situation, they don't have to go through the same pain as me. What are the common gotchas when installing the mysql gem onto a fresh copy of Leopard? In this case, I'm using Leopard - OS 10.5.7 The stock version of Ruby - 1.8.6 Rubygems 1.3.5 The 32bit version of 5.1.36 Mysql, installed using the GUI installer. I've dumped all the relevant config info here for my

Permission denied running a method from a Ruby gem

…衆ロ難τιáo~ 提交于 2020-01-16 11:23:38
问题 I'm using a gem called IMGKit and when I use the gem's to_img method in the console I get this error: IMGKit::CommandFailedError: Command failed: /rubyprograms/search --format jpg http://google.com -: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/open3.rb:67:in `exec': Permission denied - /rubyprograms/search (Errno::EACCES) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/open3.rb:67:in `popen3' from /System/Library/Frameworks/Ruby

尝试安装pg gem时找不到'libpq-fe.h标头

半世苍凉 提交于 2020-01-16 09:10:10
我正在使用Ruby on Rails 3.1预版本。 我喜欢使用PostgreSQL,但问题是安装 pg gem。 它给了我以下错误: $ gem install pg Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem native extension. /home/u/.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb checking for pg_config... no No pg_config... trying anyway. If building fails, please try again with --with-pg-config=/path/to/pg_config checking for libpq-fe.h... no Can't find the 'libpq-fe.h header *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check

Problems Installing puma ruby gem on OS X El Capitan 10.11

泄露秘密 提交于 2020-01-16 07:54:20
问题 When attempting to install puma "any version" on OS X El Capitan it kept failing. Thankfully, /user/dennis-best was able to shed some light and deserves all the credit for this. 回答1: For people who are having issues with puma and openssl, particularly with Mac OS 10.11 (El Capitan), adding some flags will save you hours and hours of heartache: gem install puma -- --with-cppflags=-I/usr/local/opt/openssl/include --with-ldflags=-L/usr/local/opt/openssl/lib https://gist.github.com/edvinasbartkus

Trouble upgrading Ruby on Rails from version 3.2.13 to 4.0.0

跟風遠走 提交于 2020-01-14 18:50:46
问题 For a my application I am trying to upgrade Ruby on Rails from version 3.2.13 to 4.0.0 and I am in trouble when installing / updating some gem (by using the Bundler), specifically the globalize3 gem. I am running Ruby 2.0.0-p247 . Given my Gemfile is: gem 'rails', '4.0.0' gem 'globalize3', github: 'svenfuchs/globalize3', branch: 'rails4' gem 'delayed_job', :git => 'git://github.com/collectiveidea/delayed_job.git', :branch => 'master' gem 'delayed_job_active_record', :git => 'git://github.com

Trouble upgrading Ruby on Rails from version 3.2.13 to 4.0.0

落爺英雄遲暮 提交于 2020-01-14 18:49:34
问题 For a my application I am trying to upgrade Ruby on Rails from version 3.2.13 to 4.0.0 and I am in trouble when installing / updating some gem (by using the Bundler), specifically the globalize3 gem. I am running Ruby 2.0.0-p247 . Given my Gemfile is: gem 'rails', '4.0.0' gem 'globalize3', github: 'svenfuchs/globalize3', branch: 'rails4' gem 'delayed_job', :git => 'git://github.com/collectiveidea/delayed_job.git', :branch => 'master' gem 'delayed_job_active_record', :git => 'git://github.com

gem equivalent of `pip install -r requirements.txt`

蹲街弑〆低调 提交于 2020-01-14 16:38:32
问题 I made similar question for npm here: npm equivalent of `pip install -r requirements.txt` This is for gem. What are the gem equivalent of: pip freeze > requirements.txt pip install -r requirements.txt 回答1: There isn't a direct comparison in Ruby, but we have something very similar. Look at the bundler gem for how to write your list of required gems into a Gemfile and automatically generate a Gemfile.lock which contains the current versions installed. 来源: https://stackoverflow.com/questions

LoadError when creating ruby gem

你。 提交于 2020-01-14 06:21:07
问题 I'm trying to create my first gem and here's its structure: riverbattle ├── lib │ ├── riverbattle │ │ ├── base.rb │ │ ├── colorful.rb │ │ ├── computer.rb │ │ ├── constants.rb │ │ ├── exit_error.rb │ │ ├── field.rb │ │ ├── game.rb │ │ ├── human.rb │ │ ├── invalid_move_error.rb │ │ ├── move.rb │ │ ├── player.rb │ │ ├── version.rb │ │ └── victory_error.rb │ └── riverbattle.rb └── riverbattle.gemspec When I am in the directory rivarbattle/lib/riverbattle and I run the command ruby base.rb ,