Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails: Spring permission error Ubuntu 14.04

I'm trying to set up a Ubuntu 14.04 box as a development environment for rails 4.2.

When I try to run rails c, I get the following error:

fileutils.rb:252:in `mkdir': Permission denied @ dir_s_mkdir - /run/user/1000/spring (Errno::EACCES)

This is caused because /run/user/1000 is owned by user tyler and I am trying to execute the commands as user deployer. I got there by logging into the system as tyler then su - deployer.

If I log into the system as deployer, I can execute rails c without issue and it creates a separate /run/user/1001 directory owned by deployer.

  • Ubuntu 14.04.1 LTS
  • Rails-4.2.0
  • ruby-2.2
like image 708
Tyler DeWitt Avatar asked Jan 27 '15 15:01

Tyler DeWitt


1 Answers

It seems that the XDG_RUNTIME_DIR environment variable gets set for some reason. You can just run:

$ unset XDG_RUNTIME_DIR
$ rails c
like image 148
RDP Avatar answered Oct 21 '22 15:10

RDP