简体   繁体   English

RoR:$ bundle install => / usr / bin / env:ruby:不是目录

[英]RoR: $bundle install => /usr/bin/env: ruby: not a directory

I'm trying to install RoR with Mysql on Ubuntu and so far it has been a very painful and annoying experience. 我正在尝试在Ubuntu上使用Mysql安装RoR,到目前为止,这一直是非常痛苦和令人讨厌的体验。

Everything has been done with RVM, and upon trying to invoke: 一切都已经通过RVM完成,并且在尝试调用时:

$ rails new <some path> <some name> -d mysql

I get an error that MySQL is not installed, so I follow the instructions and run: 我收到未安装MySQL的错误,因此请按照说明进行操作:

$ gem install bundler
=> Successfully installed bundler 1.2.3

From here the instructions via console to install MySQL are: 从这里通过控制台安装MySQL的说明是:

=> Run 'bundle install' to install missing gems.
$ bundle install

Trying to run this command results in the following output: 尝试运行此命令将导致以下输出:

/usr/bin/env: ruby: not a directory

I would really appreciate some help, this is doing my head in since I just want to start programming. 我真的很感谢您的帮助,因为我只是想开始编程,所以我正在努力。 I expect this crap from Windows, not Ubuntu. 我希望这种垃圾来自Windows,而不是Ubuntu。

Q: How do I fix it? 问:如何解决?

Solved: 解决了:

src: https://askubuntu.com/questions/182418/how-to-get-usr-bin-env-ruby-to-point-to-the-correct-ruby-environment src: https//askubuntu.com/questions/182418/how-to-get-usr-bin-env-ruby-to-point-to-the-correct-ruby-environment

Adding: 新增:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"  # This loads RVM

to: 至:

.bashrc

THEN to fix MySQL installation errors I used the second solution (67 votes) on this question: 然后修复MySQL安装错误我在这个问题上使用了第二个解决方案(67票):

MySQL Install: ERROR: Failed to build gem native extension MySQL安装:错误:无法构建gem本机扩展

I hope this helps someone else in the future! 希望这对以后的人有所帮助!

Have you tried running 'gem install mysql2'? 您是否尝试过运行“ gem install mysql2”? Is mysql2 in your gem file? gem文件中有mysql2吗?

I had the same problem. 我有同样的问题。 In my case source /etc/profile.d/rvm.sh did the trick! 就我而言, source /etc/profile.d/rvm.sh了作用!

(Found here: http://phpcommit.wordpress.com/2012/04/06/install-apache2-php-rvmpassenger-ruby-in-ubuntu-12-04-linode/ ) (位于此处: http : //phpcommit.wordpress.com/2012/04/06/install-apache2-php-rvmpassenger-ruby-in-ubuntu-12-04-linode/

暂无
暂无

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

相关问题 ruby on rails“usr / bin / env:&#39;ruby2.3&#39;:没有这样的文件或目录” - ruby on rails “usr/bin/env: ‘ruby2.3’: No such file or directory” 捆绑安装:无法执行/ usr / local / bin / bundle:没有这样的文件或目录 - Bundle install: unable to execute /usr/local/bin/bundle: No such file or directory Heroku - / usr / bin / env:ruby1.9.1:没有这样的文件或目录 - Heroku - /usr/bin/env: ruby1.9.1: No such file or directory 在Heroku上获取“ / usr / bin / env:ruby.exe:没有这样的文件或目录” - Getting “/usr/bin/env: ruby.exe: No such file or directory” on Heroku / usr / bin / env:ruby1.8:没有这样的文件或目录 - /usr/bin/env: ruby1.8: No such file or directory / usr / bin / env:ruby.exe:没有这样的文件或目录 - /usr/bin/env: ruby.exe: No such file or directory Capistrano错误:“ / usr / bin / env ruby​​:没有这样的文件或目录” - Capistrano Error: '/usr/bin/env ruby : No such file or directory' / usr / bin / env:ruby1.9.1:rails上没有这样的文件或目录 - /usr/bin/env: ruby1.9.1: No such file or directory on rails s 命令错误:/usr/bin/env: &#39;ruby2.6&#39;: 没有那个文件或目录 - Command Error: /usr/bin/env: 'ruby2.6': No such file or directory zsh:/ usr / bin / bundle:错误的解释器:/ usr / bin / ruby​​:没有这样的文件或目录 - zsh: /usr/bin/bundle: bad interpreter: /usr/bin/ruby: no such file or directory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM