rvm

How does RVM detect when you've changed directories?

做~自己de王妃 提交于 2019-12-03 18:47:19
问题 One thing that RVM can do is notice when you've changed directories, look for an .rvmrc , and change your current Ruby version and gemset according to that file's contents. It makes this change as soon as you change into that directory and outputs a message accordingly. How does it detect a change in the current working directory? I can imagine an extremely crude way of doing this: run a daemon that runs as the current user and keeps checking the results of pwd . But I'm sure that's not what

mac系统ruby on rails开发环境搭建

房东的猫 提交于 2019-12-03 18:31:46
mac系统ruby使用rvm隔离开发环境 安装rvm $ curl -L https://get.rvm.io | bash -s stable 这会在~/.profile添加如下代码 [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" 这时,每次打开shell会话,都有如下输出 $ which rvm /Users/apple/.rvm/bin/rvm 安装ruby指定的版本 $ rvm install 2.2.2 3.创建gemset $ rvm use 2.2.2 $ rvm gemset create name 4.切换gemset $ rvm use 2.2.2 $ rvm gemset use name 5.安装bundle $ gem install bundle 6.根据Gemfile创建项目的依赖包 $ cd path/to/project $ ./bin/bundle install 7.执行数据库迁移 $ cd path/to/project $ ./bin/rake db:migrate 8.启动服务 $ cd path/to/project $ ./bin/rails server 来源: oschina 链接: https://my.oschina.net/u

【CocoaPods】CocoaPods安装

a 夏天 提交于 2019-12-03 18:30:16
一、配置ruby 如果ruby版本过低,则可能导致cocoapods 安装失败! A、 查看ruby 版本,在终端输入: $ ruby -v B、通过rvm更新ruby: rvm (Ruby Version Manager,Ruby版本管理器),包括Ruby的版本管理和Gem库管理(gemset) 1、安装ruby,耐心等待一段时间 $ curl -L https://get.rvm.io | bash -s stable 2、查看rvm版本 $ rvm -v 3、查看ruby版本列表 $ rvm list known 4、安装ruby,比如我选最新版2.3.0 $ rvm install 2.3.0 安装完成后查看ruby版本即可。 C、替换ruby源 由于默认的源地址无法访问cocoapods,我们需要用(注意是 https 哦)"https://gems.ruby-china.org/" 来替换默认的源地址。 替换步骤: 1、先删除默认源,终端输入如下命令: $ gem sources --remove https://rubygems.org/ 2、增加要替换的源: $ gem sources -a https://gems.ruby-china.org/ 3、验证是否添加成功: $ gem sources -l 输出结果如下,有且只有https://gems.ruby

Installing RVM on Ubuntu

橙三吉。 提交于 2019-12-03 17:57:44
问题 I've got a strange error when I try to run this rvm install script (newly installed ubuntu 11.10): bash < <(curl -s https://rvm.beginrescueend.com/install/rvm) I got this: mkdir: cannot create directory: ”/usr/share/ruby-rvm/src” The problem is, I want to install a per-user rvm to my $HOME, and dont understand what this script wants with /usr/share/ruby-rvm . I need my rvm at $HOME/.rvm directory. I've got no env variable with $rvm_ prefix, I checked. 回答1: You may have installed the debian

RVM Requiremets tries to tap deprecated homebrew/versions

时光毁灭记忆、已成空白 提交于 2019-12-03 17:31:37
I'm trying to get a Ruby on Rails project running on my Mac OS Sierra (10.13.3) machine. When I navigate to the Rails folder, RVM tells me the following: Required ruby-1.9.3-p392 is not installed. To install do: 'rvm install "ruby-1.9.3-p392"' However, when I do that install, I get the following: $ rvm install "ruby-1.9.3-p392" Searching for binary rubies, this might take some time. No binary rubies available for: osx/10.13/x86_64/ruby-1.9.3-p392. Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies. Checking requirements for osx. Installing

Install ruby headers with rvm

点点圈 提交于 2019-12-03 17:23:14
Travis CI uses RVM to provide Ruby, but it doen't seem to contain the headers: $ find /home/vagrant/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/i686-linux /home/vagrant/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/i686-linux /home/vagrant/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/i686-linux/zlib.so /home/vagrant/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/i686-linux/dl.so /home/vagrant/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/i686-linux/syck.so /home/vagrant/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/i686-linux/socket.so /home/vagrant/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/i686-linux/dbm.so

Define Bundle Path With Capistrano

让人想犯罪 __ 提交于 2019-12-03 17:15:57
I am using the following configurations in my deploy.rb file for capistrano: require 'bundler/capistrano' require 'rvm/capistrano' set :bundle_cmd, "/home/deployment/.rvm/gems/ruby-1.9.3-p194@global/bin/bundle" set :default_environment, { 'PATH' => "/home/deployment/.rvm/gems/ruby-1.9.3-p194/bin:/home/deployment/.rvm/bin:$PATH", 'RUBY_VERSION' => 'ruby 1.9.3', 'GEM_HOME' => "/home/deployment/.rvm/gems/ruby-1.9.3-p194", 'GEM_PATH' => "/home/deployment/.rvm/gems/ruby-1.9.3-p194", 'BUNDLE_PATH' => "/home/deployment/.rvm/gems/ruby-1.9.3-p194" } But when I run cap deploy:update I get this: *

Installing Ruby offline using rvm

我们两清 提交于 2019-12-03 16:57:18
I need to install Ruby-1.9.2 in an offline machine using rvm. I tried by copying ruby-1.9.2-p180.tar.gz in to ./rvm/archives and running rvm install ruby-1.9.2. But still rvm is trying to download Ruby from ftp.ruby-lang.org'. Any advice is greatly appreciated... I had a similar problem, where I want to deploy the ruby version and all associated gems to the production machines... I would highly recommend that you use either "rsync' or 'scp -rp' to copy the complete subdirectory ~/.rvm to the target machine . If that machine is completely offline, you could of course copy that directory with

Fresh install of RVM in Ubuntu isn't letting me install gems (zlib error)

自作多情 提交于 2019-12-03 16:56:23
问题 Ok, I just created a fresh Ubuntu 11.04 install on Windows 7 using VirtualBox (not sure if this matters or not but just an fyi) listing my rubies I get: aaron@aaron-VirtualBox:~$ rvm list rvm rubies => ruby-1.9.2-p290 [ x86_64 ] but then trying to install the rails gem I get this: aaron@aaron-VirtualBox:~$ gem install rails ERROR: Loading command: install (LoadError) no such file to load -- zlib ERROR: While executing gem ... (NameError) uninitialized constant Gem::Commands::InstallCommand

I am getting this gem install error for kgio gem when i do a bundle install

南笙酒味 提交于 2019-12-03 16:44:06
I added unicorn to my Gemfile and after that when i do a bundle install I get this error em::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /Users/adim86/.rvm/rubies/ruby-1.9.3-p0/bin/ruby extconf.rb checking for CLOCK_MONOTONIC in time.h... *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib -