gem

How to switch between different version of gem installed?

落花浮王杯 提交于 2019-12-09 14:33:03
问题 I have three version of rack installed on local machine ( rack (1.4.1, 1.3.6, 1.3.5) ). For some gem (such as Cucumber ), it requires a lower version of rack to be activated? I have tried with bundle but there is no good. When executed, cucumber will still use the activated rack with version 1.4.1 of the system. Bundle specifies which gem should be installed but doesn't ensure which gem will be activated . How could I activate certain version of rack ? 回答1: You can specify a version in

Rails 3 + carrierwave + nginx = permission denied

时光怂恿深爱的人放手 提交于 2019-12-09 13:17:46
问题 I've installed carrierwave gem with rmagick. I can get it working fine if load thro WEBrick but getting 500 Internal Server Error when trying to use nginx instead. The nginx error.log says: 2011/08/14 10:06:40 [crit] 760#0: *4247 open() "/usr/local/Cellar/nginx/1.0.4/client_body_temp/0000000033" failed (13: Permission denied), client: 127.0.0.1, server: jewellery.dev, request: "POST /items/28?locale=en HTTP/1.1", host: "jewellery.dev:8080", referrer: "http://jewellery.dev:8080/items/28/edit

GitLab sidekiq failing test

那年仲夏 提交于 2019-12-09 12:58:06
问题 I am following the instructions here: https://github.com/gitlabhq/gitlabhq/blob/4-1-stable/doc/install/databases.md When I try to run the tests: sudo -u gitlab -H bundle exec rake gitlab:env:info RAILS_ENV=production sudo -u gitlab -H bundle exec rake gitlab:check RAILS_ENV=production The first test returns orange headers, the second test shows an error with Sidekiq: Checking Sidekiq ... Running? ... no Try fixing it: sudo -u gitlab -H bundle exec rake sidekiq:start For more information see:

Ruby Gem Development - How to use ActiveRecord?

穿精又带淫゛_ 提交于 2019-12-09 12:35:45
问题 I'm currently trying to develop my first ruby gem and I'm already stuck. I used the "bundle gem" command to create the basic structure and read some tutorials but what I can't find is how to integrate ActiveRecord. Where do I create my migrations? Do I create the "db/migrations" folder within the lib folder or at the root? And do I have to do anything in the Rakefile (I found some questions where the answer was something like "you have to create your own [my_gem]:db:migrate" or something like

ruby datamapper will not load

自古美人都是妖i 提交于 2019-12-09 12:11:45
问题 I was trying to learn about the Sinatra ruby framework by following this tutorial: http://net.tutsplus.com/tutorials/ruby/singing-with-sinatra-the-recall-app-2/ however, after running the gem install and writing a simple sinatra server in test.rb like so: require 'sinatra' require 'datamapper' get '/' do "Hello, World!" end but when I run the command ruby test.rb , I get the following error: /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -

Grok Debugger本地安装配置

岁酱吖の 提交于 2019-12-09 11:37:30
本地安装Grok Debugger 来调试logstal grok 正则表达式 https://github.com/garethr/logstash-patterns/blob/master/patterns/logstash 清理已安装过的 # yum erase ruby ruby-libs ruby-mode ruby-rdoc ruby-irb ruby-ri ruby-docs # yum remove ruby 1.Ruby的安装 # yum install -y wget unzip # cd /usr/local # yum -y install openssl-devel gcc # wget https://ruby.taobao.org/mirrors/ruby/2.1/ruby-2.1.7.tar.gz # tar zxf ruby-2.1.7.tar.gz # cd ruby-2.1.7 # ./configure --prefix=/usr/local/ruby2.1.7 # make && make install # echo 'export PATH=/usr/local/ruby2.1.7/bin:$PATH'>>/etc/profile # source /etc/profile 说明:别使用ruby最新的2.2或者2.3的版本

Attemping to vendorize a gem into bundler with Rails 3, but Gem has no Gemspec

最后都变了- 提交于 2019-12-09 11:32:59
问题 Following these easy steps: gem unpack spree_easy_contact -v 1.0.2 --target vendor/gems Unpacked gem: '../vendor/gems/spree_easy_contact-1.0.2' And then in my Gemfile I add this line : gem "spree_easy_contact", :path => "vendor/gems/spree_easy_contact-1.0.2" But it fails when I run bundle install . Could not find gem 'spree_easy_contact (>= 0, runtime)' in source at vendor/gems/spree_easy_contact-1.0.2. Source does not contain any versions of 'spree_easy_contact (>= 0, runtime)' I believe

cocoapods的安装

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-09 10:15:10
1.开启 terminal 2.移除现有 Ruby 默认源 $ gem sources --remove https://rubygems.org/ 3.使用新的源 $ gem sources -a https://ruby.taobao.org/ 4.验证新源是否替换成功 $ gem sources -l 5.安装 CocoaPods $ sudo gem install cocoapods $ pod setup 备注: 苹果系统升级 OS X EL Capitan 后安装改为: $ sudo gem install -n /usr/local/bin cocoapods $ pod setup 6.更新 gem $ sudo gem update --system 7.新建工程,并在终端用 cd 指令到文件夹内 $ pod search 第三方 8.新建 Podfile 文件 $ touch Podfile 9.编辑 Podfile 文件,并写入要添加的第三方库 platform:ios, '8.0' pod 'AFNetworking', '~> 2.3.1'<-------第三方 10.导入第三方库 $ pod install 11.退出终端 来源: https://www.cnblogs.com/moxuexiaotong/p/5229692.html

CocoaPods安装流程

天大地大妈咪最大 提交于 2019-12-09 10:14:41
iOS 最新版 CocoaPods 的安装流程 1.移除现有Ruby默认源 $gem sources --remove https://rubygems.org/ 2.使用新的源 $gem sources -a https://ruby.taobao.org/ 3.验证新源是否替换成功 $gem sources -l 4.安装CocoaPods (1)$sudo gem install cocoapods 备注:苹果系统升级OS X EL Capitan后改为$sudo gem install -n /usr/local/bin cocoapods (2)$pod setup 5.更新gem $sudo gem update --system 6.新建工程,并在终端用cd指令到文件夹内 $pod search 第三方 7.新建文件 vim “Podfile”, $vim Podfile 写入以下内容并保存 小提示:(终端vim文件 按 i 可编辑 ,esc 退出编辑,:wq 可保存退出) platform:ios, '6.0' pod 'AFNetworking', '~> 2.3.1' <-------第三方 8.导入第三方库 $pod install 9.退出终端 以下是我用以前的安装流程安装时出现的一些错误 终端 cocoapods 下载bug调试: 错误1: Error

0115——cocoapod的使用

送分小仙女□ 提交于 2019-12-09 10:14:29
iOS 最新版 CocoaPods 的安装流程 1.移除现有Ruby默认源 $gem sources --remove https://rubygems.org/ 2.使用新的源 $gem sources -a https://ruby.taobao.org/ 3.验证新源是否替换成功 $gem sources -l 4.安装CocoaPods (1) $sudo gem install cocoapods 备注:苹果系统升级 OS X EL Capitan 后改为 $sudo gem install -n /usr/local/bin cocoapods (2) $pod setup 5.更新gem $sudo gem update --system 6. 新建工程,并在终端用cd指令到文件夹内 $pod search 第三方 7.新建文件 vim “Podfile”, $vim Podfile 写入以下内容并保存 小提示:(终端vim文件 按 i 可编辑 ,esc 退出编辑,:wq 可保存退出) platform:ios, '6.0' pod 'AFNetworking', '~> 2.3.1' <-------第三方 8.导入第三方库 $pod install 9.退出终端 以下是我用以前的安装流程安装时出现的一些错误 终端 cocoapods 下载bug调试: 错误1: