简体   繁体   English

耙任务提示不安全的可写目录

[英]Rake tasks prompt insecure writable dir

when i trying to perform any of rake command it will so me this error 当我尝试执行任何rake命令时,它将出现此错误

shared_helpers.rb:78: warning: Insecure world writable dir /opt/android-sdk/tools in PATH, mode 040777
rake aborted!
Gem::LoadError: You have already activated rake 11.1.2, but your Gemfile requires rake 11.1.1. Prepending `bundle exec` to your command may solve this.
/home/.rvm/gems/ruby-2.2.3/gems/bundler-1.11.2/lib/bundler/runtime.rb:34:in `block in setup'
/home/.rvm/gems/ruby-2.2.3/gems/bundler-1.11.2/lib/bundler/runtime.rb:19:in `setup'
/home/.rvm/gems/ruby-2.2.3/gems/bundler-1.11.2/lib/bundler.rb:92:in `setup'
/home/.rvm/gems/ruby-2.2.3/gems/bundler-1.11.2/lib/bundler/setup.rb:8:in `<top (required)>'
/home/examples/demo_app/config/boot.rb:3:in `<top (required)>'
/home/examples/demo_app/config/application.rb:1:in `<top (required)>'
/home/examples/demo_app/Rakefile:4:in `<top (required)>'
LoadError: cannot load such file -- bundler/setup
/home/examples/demo_app/config/boot.rb:3:in `<top (required)>'
/home/examples/demo_app/config/application.rb:1:in `<top (required)>'
/home/examples/demo_app/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)

help me solve this thank you. 帮我解决这个谢谢。

尝试这个:

bundle exec rake your_task_name

This issue comes up when your Gemfile.lock has different versions of the gems installed on your machine. 当您的Gemfile.lock在计算机上安装了不同版本的gem时,就会出现此问题。 A warning comes up as : 警告出现为:

You have already activated rake 11.1.2, but your Gemfile requires rake 11.1.1. Prepending You have already activated rake 11.1.2, but your Gemfile requires rake 11.1.1. Prepending bundle exec to your command may solve this. You have already activated rake 11.1.2, but your Gemfile requires rake 11.1.1. Prepending bundle exec You have already activated rake 11.1.2, but your Gemfile requires rake 11.1.1. Prepending to your command may solve this.

Adding bundle exec forces bundler to run the command ignoring difference of version. 添加bundle exec强制bundler运行该命令,而忽略版本差异。

Fortunately, there is a gem that solves this: rubygems-bundler. 幸运的是,有一个宝石可以解决这个问题:rubygems-bundler。

> gem install rubygems-bundler

> gem regenerate_binstubs

After this try your rake commands it will work fine. 此后,请尝试使用rake命令,它将正常工作。

Remove particular version of rake 删除特定版本的耙

with command of gem uninstall rake gem uninstall rake命令

and it will allow you to run rake command 它将允许您运行rake命令

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

相关问题 Rails-警告:不安全的世界可写目录 - Rails - Warning : Insecure world writable dir 警告:PATH模式040777下不安全的世界可写目录/ usr - warning: Insecure world writable dir /usr in PATH, mode 040777 运行“rails s”后如何修复“路径中不安全的世界可写目录/mnt/c,模式040777”错误 - How to fix "Insecure world writable dir /mnt/c in PATH, mode 040777" error after running "rails s" Rails“不安全的世界可写目录dir /Library/Ruby/Gems/1.8 in PATH,模式040777 - Rails "Insecure world writable dir /Library/Ruby/Gems/1.8 in PATH, mode 040777 警告:当我运行ruby或gem命令时,不安全的世界可写dir - warning: Insecure world writable dir when I run a ruby or gem command 警告:PATH中的不安全世界可写dir / usr / local / bin,模式040777 - warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777 在PATH中获取警告“不安全世界可写dir / home / chance”,模式040777用于rails和gem - Getting the warning “Insecure world writable dir /home/chance ” in PATH, mode 040777 for rails and gem 运行rails或rails -v时获取不安全的世界可写目录 - Getting Insecure world writable dir when running rails s or rails -v 如何将您的rake任务从gem生成器中移动到rails lib目录? - How to move your rake tasks to the rails lib dir from in a gem generator? 耙子任务一直在失败 - Rake tasks keep failing
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM