gem

如何安装使用CocoaPods(新版)

旧街凉风 提交于 2020-01-08 04:57:53
/********************************安装ruby环境************************************/ $ curl -L https://get.rvm.io | bash -s stable 期间可能会问你sudo管理员密码,以及自动通过homebrew安装依赖包,等待一段时间后就可以成功安装好 RVM。 $ source ~/.rvm/scripts/rvm 检查一下是否安装正确 $ rvm -v   rvm 1.22.17 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/] $ rvm install 2.0.0 同样继续等待漫长的下载,编译过程,完成以后,Ruby, Ruby Gems 就安装好了。 将指定版本的 Ruby 设置为系统默认版本 $ rvm 2.0.0 --default 同样,也可以用其他版本号,前提是你有用 rvm install 安装过那个版本 这个时候你可以测试是否正确 $ ruby -v   ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin13.0.0] $ gem -v  2

Create a table in Prawn by its html representation

﹥>﹥吖頭↗ 提交于 2020-01-07 09:34:51
问题 Earlier Prawn gem allowed to create a table by its html representation (having an html table string as an input argument like <table class="abc"> .... </table> ). Now I didn't find this facility in the manual. So is it possible now? If not, is there any other option then? 回答1: TL;DR: if your use-case is 1) generating both HTML and PDF data (like online invoices etc.), and 2) making sure both look the same, then Prawn is not really the best solution (which is the same suggestion in the Prawn

Create a table in Prawn by its html representation

谁都会走 提交于 2020-01-07 09:34:37
问题 Earlier Prawn gem allowed to create a table by its html representation (having an html table string as an input argument like <table class="abc"> .... </table> ). Now I didn't find this facility in the manual. So is it possible now? If not, is there any other option then? 回答1: TL;DR: if your use-case is 1) generating both HTML and PDF data (like online invoices etc.), and 2) making sure both look the same, then Prawn is not really the best solution (which is the same suggestion in the Prawn

Dependency error while installing the gem “joyride-rails”

◇◆丶佛笑我妖孽 提交于 2020-01-07 07:51:17
问题 My rails version is 3.2.12 . I am trying to implement gem "joyride-rails", "~> 0.0.14" in my application, but it clashes with some of my other gems. Already in my Gemfile: gem "haml-rails", ">= 0.4" gem 'activeadmin-mongoid', github: 'elia/activeadmin-mongoid', branch: 'active-admin-spec-suite' When I run the bundle command, I get this error: Bundler could not find compatible versions for gem "haml": In Gemfile: joyride-rails (~> 0.0.14) ruby depends on haml (~> 3.1) ruby haml-rails (>= 0.4)

How to include x86-mingw32 binaries when install a gem

荒凉一梦 提交于 2020-01-06 19:56:11
问题 On Windows 7, with ruby 2.1.6: I try to install gtk3 with: gem install gtk3 C:\>gem install gtk3 Fetching: pkg-config-1.1.6.gem (100%) Successfully installed pkg-config-1.1.6 Fetching: cairo-1.14.1-x86-mingw32.gem (100%) Successfully installed cairo-1.14.1-x86-mingw32 Fetching: glib2-2.2.5-x86-mingw32.gem (100%) Successfully installed glib2-2.2.5-x86-mingw32 Fetching: gobject-introspection-2.2.5-x86-mingw32.gem (100%) Successfully installed gobject-introspection-2.2.5-x86-mingw32 Fetching:

Mysql2::Error: Table 'conversations' already exists

点点圈 提交于 2020-01-06 15:25:14
问题 I'm getting this error after trying to update a gem (mailboxer) and removing it. Mysql2::Error: Table 'conversations' already exists: CREATE TABLE conversations ( id int(11) DEFAULT NULL auto_increment PRIMARY KEY, subject varchar(255) DEFAULT '', created_at datetime NOT NULL, updated_at datetime NOT NULL) I tried: Bundle exec rake db:migrate rollback then rake db:migrate Bundle exec rake db:migrate v= xxxxxxxx then rake db:migrate getting rid of the migration files (that worked but I don't

Kitchen/berkshelf wants old gem?

半世苍凉 提交于 2020-01-06 14:14:31
问题 I want to test some changes to a cookbook, so I did what I used to do, but the result was far from normal: $ ../gem-sucks/bin/kitchen converge -----> Starting Kitchen (v1.2.1) !!!!!! The `berkshelf' gem is missing and must be installed or cannot be properly activated. Run `gem install berkshelf` or add the following to your Gemfile if you are using Bundler: `gem 'berkshelf'`. >>>>>> ------Exception------- >>>>>> Class: Kitchen::UserError >>>>>> Message: Could not load or activate Berkshelf

Compass gemfile syntax error on Ubuntu 12.10, Ruby 1.9.3

▼魔方 西西 提交于 2020-01-06 08:01:08
问题 Having run the standard procedure for installing the rvm, which also installs Ruby 1.9.3, then installing gems for rake, compass, sass, bundler and guard, then adding my gems/bin directory to my path I get the following message on running compass: /home/m1ke/.rvm/gems/ruby-1.9.3-p362/gems/bundler-1.2.3/lib/bundler/dsl.rb:35:in `rescue in eval_gemfile': Gemfile syntax error: (Bundler::GemfileError) gem "guard", "~> 1.0.1" ^ from /home/m1ke/.rvm/gems/ruby-1.9.3-p362/gems/bundler-1.2.3/lib

Compass gemfile syntax error on Ubuntu 12.10, Ruby 1.9.3

♀尐吖头ヾ 提交于 2020-01-06 08:01:06
问题 Having run the standard procedure for installing the rvm, which also installs Ruby 1.9.3, then installing gems for rake, compass, sass, bundler and guard, then adding my gems/bin directory to my path I get the following message on running compass: /home/m1ke/.rvm/gems/ruby-1.9.3-p362/gems/bundler-1.2.3/lib/bundler/dsl.rb:35:in `rescue in eval_gemfile': Gemfile syntax error: (Bundler::GemfileError) gem "guard", "~> 1.0.1" ^ from /home/m1ke/.rvm/gems/ruby-1.9.3-p362/gems/bundler-1.2.3/lib

Remove RVM, Ruby and gems completely?

旧街凉风 提交于 2020-01-06 03:38:05
问题 I had to downgrade Rails and now the gems, the versions, and everything, are completely messed up and I feel like jumping from my window. I just want to destroy everything related with RVM, Ruby and gems to make sure I make a 100% clean reinstallation. How can I do that? 回答1: Linux and installed as regular user ? Than all you need to do is: rm -Rf ./.rvm rm -Rf ./.gem rm -f ./.gemrc You can also check ~/.bashrc and ~/.bash_profile files for lines like this: PATH=$PATH:$HOME/.rvm/bin # Add RVM