Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 363 Vote(s) - 3.49 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rails keeps telling me that it's not currently installed

#1
I use `rvm` to manage different rubies and their gemsets. My shell is zsh with oh-my-zsh configured with basic settings. Enabled oh-my-zsh plugins are ruby, rails, osx, and git. Here's the command I used to install ruby-1.8.7 and rails-3.0.7.

rvm install 1.8.7
rvm use 1.8.7
gem install rails -v=3.0.7

and then I typed `rails` and got:

Rails is not currently installed on this system. To get the latest version, simply type:

$ sudo gem install rails

You can then rerun your "rails" command.

I've tried more thorough installs also, Like reinstall `rubygems` after switching to ruby-1.8.7, or create a completely new gemset, but with no luck.

Here's the rvm info:


ruby-1.8.7-p352@rails:

system:
uname: "Darwin yicai.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64 x86_64"
bash: "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)"
zsh: "/bin/zsh => zsh 4.3.9 (i386-apple-darwin10.0)"

rvm:
version: "rvm 1.8.6 by Wayne E. Seguin ([email protected]) [

[To see links please register here]

;

ruby:
interpreter: "ruby"
version: "1.8.7"
date: "2011-06-30"
platform: "i686-darwin10.8.0"
patchlevel: "2011-06-30 patchlevel 352"
full_version: "ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-darwin10.8.0]"

homes:
gem: "/Users/nil/.rvm/gems/ruby-1.8.7-p352@rails"
ruby: "/Users/nil/.rvm/rubies/ruby-1.8.7-p352"

binaries:
ruby: "/Users/nil/.rvm/rubies/ruby-1.8.7-p352/bin/ruby"
irb: "/Users/nil/.rvm/rubies/ruby-1.8.7-p352/bin/irb"
gem: "/Users/nil/.rvm/rubies/ruby-1.8.7-p352/bin/gem"
rake: "/Users/nil/.rvm/bin/rake"

environment:
PATH: "/Users/nil/.rvm/gems/ruby-1.8.7-p352@rails/bin:/Users/nil/.rvm/gems/ruby-1.8.7-p352@global/bin:/Users/nil/.rvm/rubies/ruby-1.8.7-p352/bin:/Users/nil/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/sbin"
GEM_HOME: "/Users/nil/.rvm/gems/ruby-1.8.7-p352@rails"
GEM_PATH: "/Users/nil/.rvm/gems/ruby-1.8.7-p352@rails:/Users/nil/.rvm/gems/ruby-1.8.7-p352@global"
MY_RUBY_HOME: "/Users/nil/.rvm/rubies/ruby-1.8.7-p352"
IRBRC: "/Users/nil/.rvm/rubies/ruby-1.8.7-p352/.irbrc"
RUBYOPT: ""
gemset: "rails"

and the gem version is 1.8.10, the latest.
Reply

#2
**For rvm users**

you also need to create gemset:

you have have cloned the project, ran bundle install and when you try rails s and you still get

Rails is not currently installed on this system. To get the latest version, simply type:

$ sudo gem install rails

You can then rerun your "rails" command.

then try

rvm gemset create <you gemset name>
rvm use gemset <newly created gemset>
bundle install
rails s

Also make sure you are correct version of ruby before creating the gemset
To do this type rvm list

* ruby-2.3.4 [ x86_64 ]
ruby-2.5.3 [ x86_64 ]
ruby-2.6.0 [ x86_64 ]
=> ruby-3.2.1 [ x86_64 ]

# => - current
# =* - current && default
# * - default

The current version being used should have a asterisk before it, like above.

Reply

#3
I was following along with the Odin Project ruby-on-rails course by

- installing rbenv,

- adding `eval "$(rbenv init -)"` to `~/.zshrc`

- installing rails gem

- attempting to run `rails new my_first_rails_app`

But I had forgot to run `source ~/.zshrc` after editing the file, so I was seeing the error:

> Rails is not currently installed on this system.
Reply

#4
For me ( MacOS Monterey, rbenv) adding rails version to gem install command get the problem resolved.

you can find a specific version of rails that matches to your ruby from this [link][1] and replace the VERSION .

gem install rails -v VERSION
rbenv rehash

[1]:

[To see links please register here]


after successful installation, then rails should be added to /Users/your_user/.rbenv/shims

Also plz check that your shims directory should be the first element of your path.

➜ ~ echo $PATH #
/Users/ario/.rbenv/shims: ...

Reply

#5
I found this problem but the solutions above didn't solve it. I am not using rvm (and I'm working on mac) and I had to update the path to add rails executable directory:

echo 'export PATH="/usr/local/lib/ruby/gems/3.0.0/bin:$PATH"' >> ~/.zshrc
Reply

#6
Here is how it worked for me:
1. Intall rvm in mac by following the mac [installation instruction](

[To see links please register here]

)

2. `rvm install ruby`

3. `gem install rails`

4. `rails --version`
Reply

#7
**Rbenv users**

I had the same issue and this worked for me.

Setting the ruby version in the current directory.

```
rbenv local 2.7.1
```

Then I was able to run `rails new`
Reply

#8
I was looking through the source and found another error message that suggested the user run the following command.

I ran the command and everything now works. None of the suggestions above worked for me. Run the command from inside your newly created Rails app.

gem pristine --all
Reply

#9
I have encountered this problem, but it has been resolved.
I use macOS, I do not use `rvm`, I only use `HomeBrew`, I first use `gem env` to get the installation directory of all gems, mine is:

$ gem env
RubyGems Environment:
   -RUBYGEMS VERSION: 3.1.2
   -RUBY VERSION: 2.7.1 (2020-03-31 patchlevel 83) [x86_64-darwin19]
   -INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/2.7.0
   -USER INSTALLATION DIRECTORY: /Users/myname/.gem/ruby/2.7.0
...

Then you try to go to `/usr/local/lib/ruby/gems/2.7.0` to find the executable file directory of the rails gem that you have installed, for example: `/usr/local/lib/ruby/gems/2.7.0/bin`, then add to the path environment variable
Reply

#10
I was having this problem today. I haven't 100% solved it, but in new tabs I can do `rvm use 2.5.5` and then `rails -v` works fine.

```
➜ my-repo git:(next_release) ruby -v
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-darwin18]
➜ my-repo git:(next_release) rails -v
Rails is not currently installed on this system. To get the latest version, simply type:

$ sudo gem install rails

You can then rerun your "rails" command.
➜ my-repo git:(next_release) rvm use 2.5.5
Using /Users/amberwilkie/.rvm/gems/ruby-2.5.5
➜ my-repo git:(next_release) rails -v
Could not find rake-12.3.3 in any of the sources
Run `bundle install` to install missing gems.
➜ my-repo git:(next_release) bundle install
```
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through