在滑轨上设置红宝石时无许可 [英] No permission when setting up ruby on rails

查看:91
本文介绍了在滑轨上设置红宝石时无许可的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天,我正尝试使用本教程使用Postgresql在Rails上设置ruby:

Today I was trying to set up ruby on rails with postgresql using this tutorial:

https://gorails.com/setup/ubuntu/14.04

这是我的命令,直到第一个遇到问题:

Here are my commands till the first encountered problem:

sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev

cd
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL

然后终端告诉我未安装rbenv我应该安装它。教程中没有这样说,所以我回头看了一下命令,发现第一个echo命令中有错字。

Then the terminal told me that rbenv is not installed and I should install it. The tutorial didn't say something like that, so I looked back at my commands and I saw I had a typo in the first echo command.

所以我键入了3最后一次命令:

So I typed the 3 last commands again:

echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL

终端说了同样的话,所以我忽略了它并继续。

The terminal said the same thing, so I ignored it and continued.

一切都还不错,直到我第一次运行Rails服务器。终端告诉我一些宝石不见了,我应该安装它们。我做到了当我尝试再次运行该命令时,出现此消息:

Everything seemed ok till the end when I ran rails server for the first time. The terminal told me that some gems are missing and I should install them. I did that. When I tried to run the command again, this message came up:

http://pastebin.com/etEjufzd
(我通过pastebin发布,因为它是一条大消息)

http://pastebin.com/etEjufzd (I'm posting it through pastebin because it's a large message)

我以为我应该更改开发日志的权限,但这真的是问题吗?在本教程的评论部分,其他人似乎没有发生这种情况。如果确实是服务器无法启动的原因,如何更改此文件的权限?确实是一个只读文件。

I thought that I should change the permissions of the development log, but is this really the problem? At the comment section of the tutorial it didn't seem like this happened to other people. If this is indeed the cause of my server failing to start, how do I change the permissions of this file? It is indeed a read-only file.

此外,如果错误是流程开始时(或我没有做过的流程的其他部分)的错别字没有通知),我该怎么做又没有碰撞?换句话说,是否可以收回我已经做过的事情,以便我可以再次做它们?

Also, if the mistake was that typo in the beginning of the process (or in some other part of the process which I didn't notice), how do I do it again without collisions? In other words, is it possible to take back things that I've done so that I can do them again?

非常感谢您的宝贵时间。

Thank you very much for your time.

推荐答案

首先,以消除此警告:

warning: Insecure world writable dir /home in PATH

您应该这样做:

chmod go-w /home/

这将从<$ c $中删除写入权限c> group 和 other (文件所有者以外的其他所有人)。

This will remove the write permission from group and other (everyone else except the file owner).

第二,删除此错误:

Rails Error: Unable to access log file. Please ensure that /home/pavlos55/myapp/log/development.log exists and is writable

chmod 0664 /home/pavlos55/myapp/log/development.log

这篇关于在滑轨上设置红宝石时无许可的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆