0

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".

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. 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. 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. But, its too showing errors on other ruby lib command: rails script/generate model Book Rails is throwing me errors.

 /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?

Curious Developer
  • 705
  • 3
  • 9
  • 29

2 Answers2

2

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. There is also rvm, which is a heavier manager and a bit more invasive.

Volte
  • 1,905
  • 18
  • 25
  • Yes, you are absolutely right about it. But, I don't have much information on Ubuntu system when start throwing errors. Now, my PC is throwing errors when I try to run ruby application. And, this installation fixing & uninstalling s/w have uninstalled my pgAdmin and maybe databases as well. I need to either fix the setup or remove it completely and then reinstall it. – Curious Developer Nov 22 '18 at 16:44
  • Or Maybe you can help me resolving the issue, I am currently having. I am clue less. – Curious Developer Nov 23 '18 at 10:14
-1

install the newer versions with rbenv

  • brew install 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 install.
  • brew upgrade rbenv ruby-build

    and then install rails
    ruby on rails setup

    for database i preferred sqlite browser

adarsh
  • 306
  • 5
  • 16