尝试启动Spring时遇到以下错误(https://github.com/jonleighton/spring)。我正在使用Ubuntu 12.04 LTS 12.04的Vagrant盒子中运行它。
vagrant@rails-starter-box:/vagrant/ticketee$ spring start
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/spring-0.0.8/lib/spring/server.rb:85:in `unlink': Text file busy - /vagrant/ticketee/tmp/spring/spring.pid (Errno::ETXTBSY)
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/spring-0.0.8/lib/spring/server.rb:85:in `unlink'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/spring-0.0.8/lib/spring/server.rb:85:in `block (2 levels) in set_exit_hook'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/spring-0.0.8/lib/spring/server.rb:84:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/spring-0.0.8/lib/spring/server.rb:84:in `block in set_exit_hook'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/spring-0.0.8/lib/spring/server.rb:34:in `initialize': Operation not permitted - /vagrant/ticketee/tmp/spring/spring (Errno::EPERM)
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/spring-0.0.8/lib/spring/server.rb:34:in `open'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/spring-0.0.8/lib/spring/server.rb:34:in `boot'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/spring-0.0.8/lib/spring/server.rb:15:in `boot'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/spring-0.0.8/lib/spring/client/start.rb:13:in `call'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/spring-0.0.8/lib/spring/client/command.rb:7:in `call'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/spring-0.0.8/lib/spring/client.rb:23:in `run'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/spring-0.0.8/bin/spring:4:in `'
from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/spring:19:in `load'
from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/spring:19:in `'
from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `'
答案 0 :(得分:2)
由于Vagrant的只读文件系统,您需要将环境设置变量SPRING_TMP_PATH到/ vagrant目录之外的某个地方
在命令行运行
mkdir ~/spring_tmp; export SPRING_TMP_PATH=/home/vagrant/spring_tmp
spring start
然后运行
spring status
如果spring现在正在运行,那么将以下行添加到〜/ .bashrc
export SPRING_TMP_PATH="/home/vagrant/spring_tmp" # Temp PATH for spring
归功于George Brocklehurst
答案 1 :(得分:0)
我在RSpec上遇到了这个错误。我不得不从共享文件夹中通过SMB(cifs)挂载/ windows。我还必须更改共享文件夹的权限以授予写访问权限。您可以向所有人授予完全控制权,也可以向Windows用户授予完全控制权,但是您必须以权限进行安装。
mount -t cifs //10.0.2.2/aidc / windows -o credentials = / etc / samba / credentials,uid = 500,gid = 500
您还必须在虚拟盒中安装Samba(cifs?)。
我听说vboxf非常糟糕,并且无法处理大量文件。