Ruby on Rails Bash Profile Issue - ruby-on-rails

I'm trying to learn to use Ruby on Rails (going through Hartl's tutorial for 3.2) and I'm trying to get some command line tools to work from the command prompt in Terminal. In this particular example I'm trying to get Sublime Text 2 to work. Everything is setup, but when I run subl --help, for example it returns
-bash: subl: command not found
I followed all the directions in this link - http://www.sublimetext.com/docs/2/osx_command_line.html
and I also used Stack Overflow to try to figure out how to solve this error and it seems to be a bash profile problem, but I don't know how to access, or modify this profile to get things working. Can you offer any help?
Thanks!

If you're using OSX Lion, you may not have a .bash_profile file. Use the answers to this question for help in creating/using one, and then put the exports suggested by the howto at sublimetext.com in it.

Related

Do I build Ruby documentation in Ubuntu ? Or should I simply move past this?

While navigating through http://installfest.railsbridge.org/installfest/linux I made it to step 4 and instead of rvm install 2.3 I used rvm install 2.4.4 in the Ubuntu command prompt and everything ran fine. Once output was finished, the last two lines said: Install of ruby-2.4.4 - #complete
Ruby was built without documentation, to build it run: rvm docs generate-ri What do you fine people think? Build or not? The above link is meant to be part of an installation process for The Odin Project, which is just a free online web dev course if that helps put things into perspective.
I use RubyMine. When I'm curious about a method, such as render, I put the text caret on it and hit Control+B. RubyMine takes me to the method's definition, where I can read the comment which generates that documentation.
I always build Ruby and Gems with full documentation, and I never bother to read their output...

Ruby On Rails Installation Mac OS X Bundler GemFileNotFound

I'm using Mac OS X Sierra and following Daniel's Setup Article to install Ruby on Rails. All goes well until I get try to confirm the Rails version, I get errors saying it can't locate several files. Here's a screenshot of the console output for the last couple of steps:
After the first attempt, I imploded rvm, removed all traces from .bashrc, .bash_profile, and .profile, and started from the beginning. I hit the same issue at the same point in the process. If any further information would be useful, please let me know and I'll be glad to modify. Just in case it has something to do with $PATH, I'll put the echo $PATH output below:
/Users/john/.rvm/gems/ruby-2.4.1#rails5.1/bin:/Users/john/.rvm/gems/ruby-2.4.1#global/bin:/Users/john/.rvm/rubies/ruby-2.4.1/bin:/Users/john/.rvm/bin:/usr/local/bin:/usr/bin:/usr/local:/bin:/usr/local/sbin:/sbin:/Users/john/bin:/usr/local/mysql/bin:/usr/local/opt/openssl/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Server.app/Contents/ServerRoot/usr/bin:/Applications/Server.app/Contents/ServerRoot/usr/sbin
Thanks in advance for any suggestions.
[edit] Not having had any replies and having spent an entire day trying to get it running locally, I decided to try an online environment with cloud9. I was up and running on cloud9 in 15 minutes without any issues, and that includes creating the account. I would still like to know if anyone has any ideas about the rvm local version, so I'll leave the question for now. [/edit]

subl: command not found

I'm a newbie trying to train my self using ruby on rails. I am trying to follow an instruction where I am require to type in "subl Gemfile" on Git Bash but it constantly keeps showing 'sh.exe": subl: command not found'. Kindly advice the way forward.
P/S: I am a beginner in programming
go to the directory where you're creating your RoR app.
suppose you're creating your app at
/Users/LocalUser/workspace/YourApp
Then, there typing subl Gemfile would work
first type pwd in your command terminal and check where are you right now
also if you're running it from there, then try following link solution
https://danlimerick.wordpress.com/2014/01/07/git-for-windows-tip-opening-sublime-text-from-bash/

Ruby rails error Invalid Switch

ashamed to say, i got home decided to follow a tutorial and got stuck very early on. I'm running rails 3.1.1 on windows and attempting the tut from http://guides.rubyonrails.org/getting_started.html
If you look at 4.2 it tells us to run a command: $ rm public/index.html - which in windows i think is just in cmd type cd blog and then its just erase public/index.html
But i get the error returned: Invalid Switch "index.html".
Anyone who can shed some light i would be much appreciative. I can't beleive im stuck already!
Thanks
M
Your problem is that in windows you have to use backslash instead of slash in unix-like systems. Use erase public\index.html

The system cannot find the path specified when starting Ruby and Rails command prompt

I just started learning rails a week ago and everything worked until today. Now when I start the Ruby command prompt, it says:
The system cannot find the path specified.
# Under Rails Environment Configuration.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
---
The paths for ruby and rails show up correctly.
I'm using Windows Vista 32-bit. Any help would be greatly appreciated, thanks!
You've probably used "Ansicon" - a program to get the colors in windows prompt right. If you installed it permanently with -i parameter and consequently moved/deleted its directory, it would lead to this error. (I've just experienced it)
The solution is to renew the location of the ansicon data files or to remove the following registry entry:
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun
You can find more on this issue at http://carol-nichols.com/2011/03/17/the-system-cannot-find-the-path-specified/
Good luck!
I had the same problem in Windows 7 and solved it by adding Git/bin directory to the system path variable (found the answer here). Hope this helps someone!
None of the answers above helped me. My issue was whenever i typed rail -v it gave me the same error. I had to install rails, i used the following command:
gem install rails --no-document
you can check out the following installation steps to get around the error:
http://docs.railsbridge.org/installfest/windows

Resources