Ruby and Rails stop working after restarting Linux server

60 views
Skip to first unread message

Ruruoni Himura

unread,
Apr 16, 2016, 12:54:58 AM4/16/16
to rubyonra...@googlegroups.com
Hey,

I used rbenv to install the latest version of ruby. Then I use "gem
install rails -v 4.2.4" to add rails. I install a few other gems and
then setup the web app in question (in this case it's Redmine).

After I complete the install on my user that I'm using to host the
Redmine process I'm able to launch the server, access it and use
everything as normal.

However if I restart the server or even log out of the user I created
for hosting Redmine neither the ruby nor rails commands will work any
longer unless I reinstall the entire suite again. (I got rbenv to keep
working on restart though).

ruby
The program 'ruby' can be found in the following packages:
* ruby
* ruby1.8
Try: sudo apt-get install <selected package>

rails
The program 'rails' can be found in the following packages:
* ruby-railties-3.2
* ruby-railties-4.0
Try: sudo apt-get install <selected package>

I'm using Ubuntu 14.04 LTS and I used git clone to install rbenv and
then used rbenv to install ruby. I did all the installs on the user I
want to be hosting the app from.

The strange part is if I login to root I'm able to use ruby and rails
after restart as normal, but I shouldn't be hosting the web app on root
anyways.

I tried googling for the solution to this for quite a long time but none
of the pages I found helped to fix this.

What do you think the problem is?

--
Posted via http://www.ruby-forum.com/.

Hassan Schroeder

unread,
Apr 16, 2016, 11:44:56 AM4/16/16
to rubyonrails-talk
On Fri, Apr 15, 2016 at 9:54 PM, Ruruoni Himura <li...@ruby-forum.com> wrote:

> However if I restart the server or even log out of the user I created
> for hosting Redmine neither the ruby nor rails commands will work any
> longer unless I reinstall the entire suite again. (I got rbenv to keep
> working on restart though).

> What do you think the problem is?

Have you followed the directions in the rbenv README on adding
the installation to your PATH? It sounds like not...

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
Consulting Availability : Silicon Valley or remote

Robby O'Connor

unread,
Apr 16, 2016, 11:47:58 AM4/16/16
to rubyonra...@googlegroups.com

Tell rbenv to use the default ruby version...I use rvm but rvm use 2.2 --default

Definitely RTFM.

--Rob
Sent from my cell, please excuse any typos.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yCudE4-31-K3HSfX1m4H3tYBWQmtgNbnhaxJhkEs5yFrA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruruoni Himura

unread,
Apr 17, 2016, 11:41:52 AM4/17/16
to rubyonra...@googlegroups.com
So I managed to figure out what the issue was myself, I'll post the
solution here in case others had a similar issue.

It was a folder permissions issue with the user I'd created to run the
ruby on rails application which had existed before the installation.

Instead of spending time going through permissions I decided to just
delete the user and folder, recreate the user and re-install rbenv, ruby
and rails and now they all work properly on start up.

I had already read the readme and documentation and path was defined
during installation, I came here looking for some actual input into the
problem and instead I was met with a couple snarky comments from the
same person.

Why even bother to respond to a question if you aren't going to read the
OP's post to begin with? And why did you create two different guest
names that both use the same e-mail (<hassan.s...@gmail.com>)? You
come off as very unhelpful and full of yourself, and I hope most other
users on this site aren't of a similar mindset.

Anyways my problem is solved and I posted the solution used, hopefully
when the next person googles this issue they'll be able to find this
useful and save themselves the trouble that I went through, later.

Colin Law

unread,
Apr 17, 2016, 12:05:10 PM4/17/16
to Ruby on Rails: Talk
On 17 April 2016 at 16:41, Ruruoni Himura <li...@ruby-forum.com> wrote:
> ...
> Why even bother to respond to a question if you aren't going to read the
> OP's post to begin with? And why did you create two different guest
> names that both use the same e-mail (<hassan.s...@gmail.com>)? You
> come off as very unhelpful and full of yourself, and I hope most other
> users on this site aren't of a similar mindset.

As far as I can see Hassan just asked if you had followed the
instructions for adding the installation to your path. Had you
replied saying yes, you had done that, then likely he would have
suggested some other possibilities.

As to your other point, are you suggesting that Hassan and Robby
O,Connor are the same person?

By the way, this is a mailing list not a forum (though you may be
accessing it via a forum like interface) so please quote the previous
message when replying so we don't have to look back at earlier emails
to understand the context. Thanks.

Colin

Hassan Schroeder

unread,
Apr 17, 2016, 12:06:00 PM4/17/16
to rubyonrails-talk
On Sun, Apr 17, 2016 at 8:41 AM, Ruruoni Himura <li...@ruby-forum.com> wrote:

> I had already read the readme and documentation and path was defined
> during installation

Asking for clarification about something *not mentioned* in your
original post is "snarky"? Your description of the symptoms could
easily have pointed to a PATH problem.

> Why even bother to respond to a question if you aren't going to read the
> OP's post to begin with?

Why post a question if you're not willing to respond to requests for
clarifying information?

> And why did you create two different guest
> names that both use the same e-mail

Sorry, but that's just delusional.

Glad your issue is resolved, and good luck.
Reply all
Reply to author
Forward
0 new messages