You are not logged in.
Pages: 1
So i just setup my archlinux box and while installing rails i gone through this problem.
[mrb@archbook ~]$ gem install rails --no-ri --no-rdoc
WARNING: You don't have /home/mrb/.gem/ruby/1.9.1/bin in your PATH,
gem executables will not run.
Successfully installed rails-3.2.12
1 gem installed
Now trying
[mrb@archbook ~]$ rails -v
bash: rails: command not found
same with sudo
[mrb@archbook ~]$ ruby -v
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]
trying updating
[mrb@archbook ~]$ sudo gem update
Updating installed gems
Updating builder
Fetching: builder-3.2.0.gem (100%)
WARNING: You don't have /root/.gem/ruby/1.9.1/bin in your PATH,
gem executables will not run.
Successfully installed builder-3.2.0
[the rest of the list]
What should i do ?!
thanks
Offline
Seriously, did you read the "WARNING"?
Offline
Serious, did you read the warning ... or Scimmia's post.
The installation location is not in your $PATH. Add it to your path, or specify the binary with the full path to it's location.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I'd hate to use the exact same response for a third time - but it's in the warning message. It's a one line message; read it.
Last edited by Trilby (2013-03-25 12:38:32)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I bet you do.
Try "ls -a ~", when that works, go find a shell tutorial, Greg's wiki is good. And don't be a help vampire (unfortunately the link to the relevant article for this is currently down).
EDIT: it's back up: http://slash7.com/2006/12/22/vampires/
Last edited by Trilby (2013-03-25 13:42:43)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
When you installed Ruby, you should have gotten a message about gems:
The default location of gem installs is $HOME/.gem/ruby
Add the following line to your PATH if you plan to install using gem
$(ruby -rubygems -e "puts Gem.user_dir")/bin
If you want to install to the system wide location, you must either:
edit /etc/gemrc or run gem with the --no-user-install flag.
Ideally, you should install gems as your regular user, and modify your PATH.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
I don't understand why you are so rude.
I guess that I have to find the rails path and add an alias to my ~/.bashrc file, but I cannot find the rails path.
As shown above, I guess the full path is /home/mrb/.gem/ruby/1.9.1/bin, where mrb is replaced my username. Well, in my home I have no .gem directory. Now I'm asking what is the rails full path if it is not.
I thank you for the answers, despite the rudeness.
Offline
Then it's in /root/.gem, just like the warning message you recieved would have told you.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
WorMzy I installed ruby gem as root. What can I do now?
You can either:
Install it as your normal user (optionally removing it from root)
Install it system-wide using a method outlined in the installer message
Make /root/.gem/ruby/ruby_ver/bin readable as non-root users and give non-root users the ability to navigate to this directory (chmod o+x to parent directories)
I'd say option one is best if you're planning on using rails for development, and option three is best for production.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Aegidius, I am sorry if you feel I was rude. That is not my intention. However, the trajectory of your questions is not a productive one.
I added this link in an edit above: http://slash7.com/2006/12/22/vampires/
You may also be well served to read ESR's article on asking good questions that is commonly linked.
If I don't like your questions, though, you may wonder why I respond at all. There are a few reasons: 1) I have hope that your questions can/will improve and be more useful in creating forum threads that will help others, 2) If your questions don't change, then at least I'd hope you can recognize how they effect the spirit of would-be-helpers.
I may be blunt, but I'm responding. I suspect many users who quickly could have answered your questions, just looked the other way as it didn't seem worth their time. I thought it might be worth mine - that remains to be seen.
When you present questions, present the relevant information. Don't say you did the same thing as the OP, when you in fact did something different (installed with sudo). Don't say you don't know how to modify your path when a simple google search would tell you exactly how. Do say what you have tried, and what actual error messages you recieved.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Offline
Pages: 1