简体   繁体   中英

Installing Rails on Mac OSX Yosemite (“application” invalid)

I've been following the amazingly convoluted path to installing Ruby (and Rails) on a Mac (OSX Yosemite). I used the Terminal to install rbenv. Then I tried to install Rails, following the instructions @ http://rubyonrails.org/download/

Terminal displays a bunch of code that suggests the operation was a success. But when I navigate to http://localhost:3000 I get the message "This webpage is not available."

Taking another look at my Terminal code, I see a couple apparent problems at the very beginning:

rails new path/to/your/new/application
Invalid application name application. Please give a name which does not    match one of the reserved rails words.
My-MacBook-Pro:~ myname$ cd path/to/your/new/application
-bash: cd: path/to/your/new/application: No such file or directory
My-MacBook-Pro:~ myname$ rails server

Can anyone explain what's going on and how I can fix it?

It looks like what is happening is that you've named your application 'application', and this is what's causing errors in your rails setup. 'application' is a keyword used internally by Rails, and is probably throwing it off.

I've always used rvm instead of rbenv. It's easy to set up on Mac OSX Yosemite using curl, and I've never had any problems installing Rails on it. Are you tied to rbenv for some reason? If not, give rvm a try : https://rvm.io/rvm/install

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM