 (add-hook 'c-mode-common-hook 'my-c-mode-hook)
 
 ;; Scripting languages
-(use-package rinari
-  :hook ruby-mode
-  :ensure t)
-(use-package robe
-  :hook (ruby-mode . robe-mode)
-  :ensure t
-  :init
-  (add-hook 'ruby-mode-hook
-            (lambda ()
-              (setq-local company-backends '((company-robe))))))
+
+(use-package enh-ruby-mode
+  :ensure t
+  :interpreter "ruby"
+  :defer 2
+  :mode ("\\.rake\\'" . enh-ruby-mode)
+  :mode ("\\Rakefile\\'" . enh-ruby-mode)
+  :mode ("\\.gemspec\\'" . enh-ruby-mode)
+  :mode ("\\.ru\\'" . enh-ruby-mode)
+  :mode ("Gemfile\\'" . enh-ruby-mode)
+  :mode ("Guardfile\\'" . enh-ruby-mode)
+  :mode ("Capfile\\'" . enh-ruby-mode)
+  :mode ("\\.thor\\'" . enh-ruby-mode)
+  :mode ("\\.rabl\\'" . enh-ruby-mode)
+  :mode ("Thorfile\\'" . enh-ruby-mode)
+  :mode ("Vagrantfile\\'" . enh-ruby-mode)
+  :mode ("\\.jbuilder\\'" . enh-ruby-mode)
+  :mode ("Podfile\\'" . enh-ruby-mode)
+  :mode ("\\.podspec\\'" . enh-ruby-mode)
+  :mode ("Puppetfile\\'" . enh-ruby-mode)
+  :mode ("Berksfile\\'" . enh-ruby-mode)
+  :mode ("Appraisals\\'" . enh-ruby-mode)
+  :mode ("\\.rb\\'" . enh-ruby-mode)
+  :config
+  (setq ruby-deep-indent-paren nil)
+  (add-hook 'ruby-mode-hook 'rbenv-use-corresponding))
+
+(use-package rbenv
+  :ensure t
+  :init
+  (progn
+    (setq
+     rbenv-modeline-function 'rbenv--modeline-plain
+     rbenv-show-active-ruby-in-modeline nil)
+    (global-rbenv-mode)))
 
 (use-package python
   :defer t

  :defer t
  :init
  (add-hook 'prog-mode-hook #'lsp)
  :hook 'lsp-ui-mode)

(use-package lsp-ui
  :ensure t
  :defer t
  ;(add-hook 'prog-mode-hook #'lsp)
  :after flycheck)

(use-package company-lsp

  (package-refresh-contents)
  (package-install 'use-package))

;; quelpa extends use-package to grab directly from git repositores that
;; are not yet published on elpa/melpa repos
(use-package quelpa
  :ensure t
  :init
