我对Ruby很陌生。我是按照TeamTreehouse上的说明在OSX(约塞米蒂)上安装Ruby开发环境的。
当我到了创建测试应用程序的步骤时。最后失败了。拒绝许可。:(不知道我做错了什么,我确实试过运行gem install debug inspector和bundle exec spring binstubb,但它们都失败了。
[]rails new testapp
create
create README.rdoc
create Rakefile
create config.ru
create .gitignore
create Gemfile
create app
create app/assets/javascripts/application.js
create app/assets/stylesheets/application.css
create app/controllers/application_controller.rb
create app/helpers/application_helper.rb
create app/views/layouts/application.html.erb
create app/assets/images/.keep
create app/mailers/.keep
create app/models/.keep
create app/controllers/concerns/.keep
create app/models/concerns/.keep
create bin
create bin/bundle
create bin/rails
create bin/rake
create bin/setup
create config
create config/routes.rb
create config/application.rb
create config/environment.rb
create config/secrets.yml
create config/environments
create config/environments/development.rb
create config/environments/production.rb
create config/environments/test.rb
create config/initializers
create config/initializers/assets.rb
create config/initializers/backtrace_silencers.rb
create config/initializers/cookies_serializer.rb
create config/initializers/filter_parameter_logging.rb
create config/initializers/inflections.rb
create config/initializers/mime_types.rb
create config/initializers/session_store.rb
create config/initializers/wrap_parameters.rb
create config/locales
create config/locales/en.yml
create config/boot.rb
create config/database.yml
create db
create db/seeds.rb
create lib
create lib/tasks
create lib/tasks/.keep
create lib/assets
create lib/assets/.keep
create log
create log/.keep
create public
create public/404.html
create public/422.html
create public/500.html
create public/favicon.ico
create public/robots.txt
create test/fixtures
create test/fixtures/.keep
create test/controllers
create test/controllers/.keep
create test/mailers
create test/mailers/.keep
create test/models
create test/models/.keep
create test/helpers
create test/helpers/.keep
create test/integration
create test/integration/.keep
create test/test_helper.rb
create tmp/cache
create tmp/cache/assets
create vendor/assets/javascripts
create vendor/assets/javascripts/.keep
create vendor/assets/stylesheets
create vendor/assets/stylesheets/.keep
run bundle install
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...
Using rake 10.4.2
Using i18n 0.7.0
Using json 1.8.2
Installing minitest 5.6.1
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.2.1
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile 0.6.2
Using nokogiri 1.6.6.2
Using rails-deprecated_sanitizer 1.0.3
Using rails-dom-testing 1.0.6
Using loofah 2.0.2
Using rails-html-sanitizer 1.0.2
Using actionview 4.2.1
Using rack 1.6.1
Using rack-test 0.6.3
Using actionpack 4.2.1
Using globalid 0.3.5
Using activejob 4.2.1
Using mime-types 2.5
Using mail 2.6.3
Using actionmailer 4.2.1
Using activemodel 4.2.1
Using arel 6.0.0
Using activerecord 4.2.1
Errno::EACCES: Permission denied @ dir_s_mkdir - /Users/jeremy/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0-static/debug_inspector-0.0.2
An error occurred while installing debug_inspector (0.0.2), and Bundler cannot continue.
Make sure that `gem install debug_inspector -v '0.0.2'` succeeds before bundling.
run bundle exec spring binstub --all
rbenv: spring: command not found
The `spring' command exists in these Ruby versions:
2.2.2
6条答案
按热度按时间0dxa2lsx1#
尝试
sudo chown -R jeremy $HOME/.rbenv
--看起来您遇到了权限问题。以后,只能以自己的身份运行rbenv,例如。没有须藤。blmhpbnm2#
参考这个github问题,https://github.com/bundler/bundler/issues/4590,你可能需要删除~/.bundle
sudo mv ~/.bundle /tmp
,然后尝试重新创建应用程序xyhw6mcr3#
我也遇到过类似的问题。我甚至不能让
rails new
运行。在这种情况下,您应该使用$ ~/ chmod -R 0755 tpm
来给予在文件夹中创建文件所需的权限,这对我来说很好。我在@Abhi对here的评论中找到了这个解决方案。我放在这里是因为提供了更多的可见性,因为原始评论可能会因其大小而不被注意(这发生在我身上),并且当我在研究时,这个问题对我来说更突出。
eaf3rand4#
te invito a que utilices esta吉亚帕拉installar rails y ruby,esto me funciono a la perfección https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rbenv-on-ubuntu-20-04
ewm0tg9j5#
我知道对我们大多数人来说,上述解决方案必须工作,但对我来说,他们没有工作,因为我没有.rbenv或.asdf文件在我的PC由于互联网访问受限。
所以我安装了pod作为
之后,一旦创建了工作区,我就转到Get Info并在那里添加了具有读写权限的用户,并对pod项目文件重复了相同的步骤。
3pmvbmvn6#
如果你看了这里,上面的答案对你没有帮助,那么也许你只是忘了加上
须户
在你的
gem安装