简体   繁体   English

如何从Ubuntu 14.04中完全卸载ruby + gems + rails,然后开始以全新的方式安装它们

[英]how to completely uninstall ruby + gems + rails out of my Ubuntu 14.04 and then start installing them as fresh

I am having a lot of issues on ruby & gem installation due to which my running projects are stopped working. 由于我的运行中的项目停止工作,我在红宝石和宝石的安装上遇到很多问题。

Current issues 当前的问题

Can anyone please guide me on "how to completely uninstall ruby + gems + rails out of my Ubuntu 14.04 and then start installing them as fresh". 谁能指导我“如何从Ubuntu 14.04中完全卸载ruby + gems + rails,然后开始重新安装它们”。

I am also unable to remove this. 我也无法删除它。 Maybe once I completely throughout of my system. 也许一旦我完全了解了整个系统。 It may allow me to fresh install ruby n rails. 它可以让我重新安装ruby n rails。 Looking into this in order to make things work again. 为了使事情再次起作用,对此进行了调查。

Can anyone help? 有人可以帮忙吗?


If you can see my question up there, I have rbenv, ruby and rails installed and a lot more. 如果您可以在那里看到我的问题,那么我已经安装了rbenv, ruby and rails等等。 I am not able to run it though. 我无法运行它。 And due to which I am thinking of removing it out of my system and install them as fresh. 因此,我正在考虑将其从系统中删除并重新安装。 Today, I somehow was able to fix a few issues and created a new rails application and started the server using MySQL. 今天,我以某种方式能够解决一些问题,并创建了一个新的Rails应用程序,并使用MySQL启动了服务器。 But, its too showing errors on other ruby lib command: rails script/generate model Book Rails is throwing me errors. 但是,它在其他ruby lib命令上也显示了错误: rails script/generate model Book Rails向我抛出错误。

 /home/<user>/.rvm/gems/ruby-2.5.3/gems/railties-5.2.1/lib/rails/app_loader.rb:53: warning: Insecure world writable dir /home/<user>/.rvm/gems/ruby-2.5.3/bin in PATH, mode 040777
rails aborted!
Don't know how to build task 'script/generate' (see --tasks)

Can anyone help? 有人可以帮忙吗?

I highly highly recommend not touching the built-in ruby/rails/gems installation. 我强烈建议不要接触内置的红宝石/轨道/宝石安装。

It's pretty standard these days to use a very lightweight manager, like rbenv which allows you to work with multiple versions of ruby, each with it's own installations of gems. 如今 ,使用非常轻量级的管理器(例如rbenv)是非常标准的,它允许您使用多个版本的ruby,每个版本都有自己的宝石安装。 There is also rvm , which is a heavier manager and a bit more invasive. 还有rvm ,它是一个较重的管理器,更具侵入性。

install the newer versions with rbenv 使用rbenv安装更新的版本

  • brew install rbenv 酿造安装rbenv
  • rbenv init 初始化
  • Close your Terminal window and open a new one so your changes take effect. 关闭终端窗口并打开一个新窗口,以使更改生效。
  • Verify that rbenv is properly set up using this rbenv-doctor script. 使用此rbenv-doctor脚本验证是否正确设置了rbenv。
  • rbenv install. rbenv安装。
  • brew upgrade rbenv ruby-build brew升级rbenv ruby​​-build

    and then install rails 然后安装滑轨
    ruby on rails setup Ruby on Rails安装

    for database i preferred sqlite browser 对于数据库,我首选sqlite浏览器

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM