Reputation: 964
Working with this repo, which requires ruby 2.1.1 and rails 4.1. I am using RVM, and I have downloaded ruby 2.1.1, but I am getting this error when I type rails -v
. I feel like I need to start completely over, but do you see anything below that may have a relatively simple solution?
When I type rails -v, I get this error:
/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/dependency.rb:298:in to_specs': Could not find 'railties' (>= 0) among 14 total gem(s) (Gem::LoadError)
When I type in ruby -v
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0]
Bash_Profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM$
RVM Gemset List
gemsets for ruby-2.1.1 (found in /Users/me/.rvm/gems/ruby-2.1.1)
=> (default)
demo
global
myapp
rails
rails4.1
Upvotes: 2
Views: 3239
Reputation: 1089
Try to run these commands:
rvm use 2.1.1@rails-devise --create
bundle install
rails -v
evan: but not when I generate my own app because it gives me an error before I can create it.
Lets discuss some basic concepts of RVM, that can help you:
Every project should contain its own gemset. Repo contains two special files in root folder:
.ruby-gemset - contains unique, project-specified name of gemset
.ruby-version - Ruby version number, to see list of available: rvm list
These files should be placed in root folder of every project on your computer. When you open project from the linux Terminal, rvm scan for these two files, read them, and activates needed ruby version and loads necessary gems automatically.
Note: each rvm session is alive in current Terminal session only. You should reactivate it for each Terminal session separately.
If current gemset name is not specified, RVM uses default
rvm gemset (unnamed gemset).
I uses default gemset for my default projects, when I need quickly create something temporary. But I noticed, that default gemsets of beginners reminds a dump of different unsystematic gems. Some of them can relate to same Gem modules, but with different versions.
Such kind of versioning, may leads to different strange errors and problems, what happened with you. If you want use a default gems set (I suppose you is a NOT rails-developer, based on your profile), open your project directory, and perform in terminal:
rvm gemset empty ''
rvm use @default --default
bundle install
Upvotes: 4