简体   繁体   English

为什么我不能启动我的网络服务器(`rails server`)?

[英]Why can't I start my webserver (`rails server`)?

I've created a new rails app using rails composer ( https://github.com/RailsApps/rails-composer ). 我使用rails composer( https://github.com/RailsApps/rails-composer )创建了一个新的Rails应用程序。 however when I start my rails server (WEBrick), I get the following error: 但是,当我启动Rails服务器(WEBrick)时,出现以下错误:

~/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/fileutils.rb:247:in `mkdir': Permission denied

I've looked at this question and tried the steps in the selected answer but I'm getting the same issue. 我已经看过这个问题,并尝试了所选答案中的步骤,但是遇到了同样的问题。 This seems like a conflict between RVM and Bundler since I've got ruby-1.9.3 as the top level directory and 1.9.1 as an intermediate directory. 这似乎是RVM和Bundler之间的冲突,因为我将ruby-1.9.3作为顶层目录并将1.9.1作为中间目录。 Not really sure what that means. 真的不知道这意味着什么。

Any help is greatly appreciated. 任何帮助是极大的赞赏。

This is generally the result of some directory in your Rails directory not having the correct permissions. 这通常是由于Rails目录中的某些目录没有正确的权限而导致的。

Here is an in-depth discussion of the permissions in Rails: https://stackoverflow.com/a/6091058/1669208 这是Rails中权限的深入讨论: https : //stackoverflow.com/a/6091058/1669208

If you wanted to check to see if that was the problem. 如果您想检查是否是问题所在。 Then on a NON-PRODUCTION SERVER give 777 access to the entire rails directory. 然后,在非生产服务器上,给777访问整个rails目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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