rvm

Switching rubies in shell script

限于喜欢 提交于 2019-12-24 05:54:09
问题 When executing a bash shell script I am using ruby 1.9.3. Then, within the script, I want to switch to JRub (I'm using rvm). I tried switching to JRuby by doing rvm use jruby within the script, but this didn't work, it said: RVM is not a function, selecting rubies with 'rvm use ...' will not work. You need to change your terminal emulator preferences to allow login shell. Sometimes it is required to use `/bin/bash --login` as the command. Please visit https://rvm.io/integration/gnome-terminal

Fresh Rails 4 app is not recognizing `rails` commands, insists that I use `rails new`

落爺英雄遲暮 提交于 2019-12-24 05:46:19
问题 I've successfully made a new application with the rails new command from a clone of the Rails master branch. The app looks fine, and is definitely Rails 4. But when I try to run any other rails command, the prompt gives me: Usage: rails new APP_PATH [options] Options: -r, [--ruby=PATH] # Path to the Ruby binary of your choice ... etc etc I've tried rails , bundle exec rails , and bin/rails , all give the same prompt. My steps for creating a new Rails 4 app were: Clone the Rails master branch

RVM not working after installing properly?

耗尽温柔 提交于 2019-12-24 02:23:49
问题 Ok so I had RVM working before but after I upgraded to Mountain Lion it appears to be gone? So I tried reinstalling it: Ayman$ curl -L https://get.rvm.io | bash -s stable % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 185 100 185 0 0 200 0 --:--:-- --:--:-- --:--:-- 755 100 9979 100 9979 0 0 5911 0 0:00:01 0:00:01 --:--:-- 5911 Downloading RVM from wayneeseguin branch stable % Total % Received % Xferd Average Speed Time Time Time

How to get rvm running inside fcgi?

不想你离开。 提交于 2019-12-24 01:25:17
问题 I had a rails 2.3 application running on apache + fcgi, and I am migrating it to rails 3.1 + rvm (+ apache + fcgi). I am now blocked at fcgi <-> rvm. I tried putting #!/usr/local/bin/rvm 1.9.2@rails31 exec ruby inside my public/dispatch.fcgi . Running /usr/local/bin/rvm use 1.9.2@rails31 exec ruby /some_path/current/public/dispatch.fcgi from my command line works fine, but the apache log shows: ERROR: Unrecognized command line argument(s): '/some_path/current/public/dispatch.fcgi ' ( see:

Ruby script cannot locate required gem

社会主义新天地 提交于 2019-12-23 22:51:00
问题 I'm trying to run a Ruby script that has worked fine in the past. I need to use the Mechanize gem, so at the top of the script, it says require 'mechanize' . However, when I try to run the script now, the Terminal output reads: /Users/codebiker/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- mechanize (LoadError) from /Users/codebiker/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require

-bash: rails: command not found

徘徊边缘 提交于 2019-12-23 22:28:18
问题 I have installed RVM and and Ruby 1.9.3 . But when I do rails c , I get this error -bash: rails: command not found I had done bundle install from my Rails app, and it was successful. But when i do gem list , I get this *** LOCAL GEMS *** bundler (1.3.5) rubygems-update (2.1.3) rvm (1.11.3.8) What could be wrong? 回答1: As Mattherick suggests, try bundle exec rails c 回答2: You can try enable the option "run command as a login shell" in your terminal profile. 回答3: You may remove the gemfile.lock

Trying to access my ruby project- LoadError pertaining to mysql

五迷三道 提交于 2019-12-23 20:12:35
问题 I'm trying to access my first ruby project. After navigating to the proper directory and typing: $ rails server I get the following error message: /Users/Rozey/.rvm/gems/ruby-1.9.2-p180/gems/mysql2-0.2.6/lib/mysql2.rb:7:in require': dlopen(/Users/Rozey/.rvm/gems/ruby-1.9.2-p180/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError) Referenced from: /Users/Rozey/.rvm/gems/ruby-1.9.2-p180/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle Reason: image

Ubuntu rvm setup issue

喜你入骨 提交于 2019-12-23 20:01:10
问题 I followed this tutorial below: https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm This worked perfectly for me; however, I have one small problem? Each time I open a new terminal I have to run this command in order for rails to work: source ~/.rvm/scripts/rvm What is the problem and why is rvm not recognized This is what I see after I open a new terminal and verify rails: robert@rob:~$ rails -v The program 'rails' is

Sass broken after install with RVM, using Assetic PHP

我的未来我决定 提交于 2019-12-23 19:21:50
问题 I'm trying to set up Assetic PHP asset compiler and I have got it working with CoffeeScript, Stylus, and Less (all the NPM packages worked perfectly). However, with Sass I am having a problem. Here are the steps I've taken so far: I installed RVM along with Ruby 1.9.3 and ran gem install sass . I ran which sass . This returned /home/jon/.rvm/gems/ruby-1.9.3-p0/bin/sass . I copied that location into SassFilter.php in Assetic where it says $sassPath = '' in the constructor function. This is the

RVM ruby on rails issue OpenSSL

无人久伴 提交于 2019-12-23 17:18:45
问题 When I create a Rails app I am getting some errors and I have no idea what they mean or how to fix them. Instead of explaining I am going to output what is happening, I think this might be the best approach to getting help with this: j3@j3:~/code/rails_projects$ rails new first_app create create README.rdoc create Rakefile create config.ru create .gitignore create Gemfile create app create app/assets/images/rails.png create app/assets/javascripts/application.js create app/assets/stylesheets