gem

Create a RVM gemset in a shared host environment

点点圈 提交于 2020-01-14 05:49:24
问题 Anyone know if there is a configuration variable to tell rvm to create the gemset in my home directory (no root access)? [p3r66567@cp40 (ruby-1.8.6) ~]$ type rvm | head -1 rvm is a function [p3r66567@cp40 (ruby-1.8.6) ~]$ which rvm /usr/local/rvm/bin/rvm [p3r66567@cp40 (ruby-1.8.6) ~]$ rvm gemset create testgemset mkdir: cannot create directory `/usr/local/rvm/gems/ruby-1.8.6-p399@testgemset': Permission denied info: Gemset 'testgemset' created. 回答1: Add this line: export rvm_gems_path="$HOME

Is it possible to require files outside the Gemfile?

老子叫甜甜 提交于 2020-01-13 13:08:42
问题 For example, I'm developing a gem, and while I'm developing, I use pry instead of IRB, and debugger for debugging. However, I don't want possible contributors to have to install them (because they may not need them). My first idea was to put them in a Bundler group: source :rubygems gemspec group :extras do gem "pry" gem "debugger" end And then people could use: $ bundle install --without extras But I want it to be a default that they're not installed. What would be perfect is that they're

Proper way of testing gems

眉间皱痕 提交于 2020-01-13 09:14:42
问题 If a gem has rails dependencies, do you think it is better to write the gem tests in a way they can be run standalone or run them under a rails project? 回答1: A gem should be a piece of code which acts stand-alone. Otherwise it is part of the application, so the tests should be created stand-alone as well. In this way others (hypothetically) can perform the tests as well. If the tests depend on your application others cannot test your gem. Furthermore when you want to test your gem it should

Problems in installing thin on windows 7

瘦欲@ 提交于 2020-01-13 07:24:12
问题 I am new to ruby. I am trying to install a ruby gem thin. It shows an error in installing the gem. I googled for the error but i could not find a link that addresses my problem. The error is: C:\Users\name\Desktop>ruby -v ruby 2.0.0p247 (2013-06-27) [i386-mingw32] C:\Users\name\Desktop>gem -v 2.0.3 C:\Users\name\Desktop>gem install thin Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing thin: ERROR: Failed to build

“gem install rails” give FilePermissionError with rbenv on mac OS X

别等时光非礼了梦想. 提交于 2020-01-13 06:35:26
问题 I've read all the other Stackoverflow posts on this problem but don't see any suitable solution for rbenv, so i'll post it on here. (most of the other posts suggest either using RVM, or the OP had already ran sudo gem install rails ). when i run gem install rails (without sudo ), i get ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory. is /Library/Ruby/Gems/2.0.0 the correct spot? why am i getting this error?

redis集群搭建

我的未来我决定 提交于 2020-01-12 12:40:42
redis集群搭建 Redis 是一个开源的 key-value 存储系统,由于出众的性能,大部分互联网企业都用来做服务器端缓存。Redis 在3.0版本前只支持单实例模式,虽然支持主从模式、哨兵模式部署来解决单点故障,但是现在互联网企业动辄大几百G的数据,可完全是没法满足业务的需求,所以,Redis 在 3.0 版本以后就推出了集群模式。 Redis 集群采用了P2P的模式,完全去中心化。Redis 把所有的 Key 分成了 16384 个 slot,每个 Redis 实例负责其中一部分 slot 。集群中的所有信息(节点、端口、slot等),都通过节点之间定期的数据交换而更新。 Redis 客户端可以在任意一个 Redis 实例发出请求,如果所需数据不在该实例中,通过重定向命令引导客户端访问所需的实例。 安装环境 OS: centos 7.2.1511 redis : 最新版 v4.0.1 单台redis安装 下载 wget http://download.redis.io/releases/redis-4.0.10.tar.gz tar zxvf redis-4.0.10.tar.gz mv redis-4.0.10 /usr/local/redis/ 如果是离线安装,则需要从官网下载指定版本,然后上传到生产环境。这里安装的是最新版redis,指定安装路径 /usr

iOS开发~CocoaPods使用详细说明

两盒软妹~` 提交于 2020-01-12 09:17:05
一、概要 iOS开发时,项目中会引用许多第三方库,CocoaPods( https://github.com/CocoaPods/CocoaPods )可以用来方便的统一管理这些第三方库。 二、安装 由于网上的教程基本都大同小异,但细节之处还不是很完善,所以借机会在这里补充下: 注:要使用CocoaPods,那就要下载安装它,而下载安装CocoaPods需要Ruby环境 1、Ruby环境搭建 当前安装环境为Mac mini 10.8.5。Mac OS本身自带Ruby,但还是更新一下保险,因为我第一次安装在没有更新Ruby的情况下就失败了。 a 查看下当前ruby版本:打开终端输入 ruby -v(确实安装了,不过用这个版本接下来工作失败了,所以更新下ruby) ritekiMac-mini:PodTest lucky$ ruby -v ruby 1 .8 .7 ( 2 0 1 2- 0 2- 0 8 patchlevel 3 5 8) [universal-darwin 1 2 .0] ritekiMac-mini:PodTest lucky$ b 更新ruby 终端输入如下命令(把Ruby镜像指向taobao,避免被墙,你懂得) gem sources --remove https://rubygems.org/ gem sources -a https://ruby

on windows Mysql native extension prob in ruby on rails gem time

隐身守侯 提交于 2020-01-11 13:38:25
问题 As I'm new to ruby on rails,need help of pro's,in first app installation,as I'm using Mysql DB on my system,i installed its gem also,but Im getting this error when I doing Bundle install for a new project app. This below error happens when bundle install is on stage of: Installing mysql2 (0.2.13) with native extensions C:\Sites\proj2>bundle install Fetching source index for http://rubygems.org/ Using rake (0.9.2) Using abstract (1.0.0) Using activesupport (3.0.9) Using builder (2.1.2) Using

on windows Mysql native extension prob in ruby on rails gem time

怎甘沉沦 提交于 2020-01-11 13:38:12
问题 As I'm new to ruby on rails,need help of pro's,in first app installation,as I'm using Mysql DB on my system,i installed its gem also,but Im getting this error when I doing Bundle install for a new project app. This below error happens when bundle install is on stage of: Installing mysql2 (0.2.13) with native extensions C:\Sites\proj2>bundle install Fetching source index for http://rubygems.org/ Using rake (0.9.2) Using abstract (1.0.0) Using activesupport (3.0.9) Using builder (2.1.2) Using

How to install mysql gem on Mac os 10.6?

↘锁芯ラ 提交于 2020-01-11 11:03:32
问题 i just installed MAMP on this iMac and the rubygems but when i run: sudo gem install mysql — –with-mysql-config=/usr/local/mysql/bin/mysql_config gives me Building native extensions. This could take a while... ERROR: Error installing mysql: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h Gem files