Ruby and Rails stop working after restarting Linux server

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

rails
The program ‘rails’ can be found in the following packages:

  • ruby-railties-3.2
  • ruby-railties-4.0
    Try: sudo apt-get install

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?

On Fri, Apr 15, 2016 at 9:54 PM, Ruruoni H. [email protected]
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 S. ------------------------ [email protected]

twitter: @hassan
Consulting Availability : Silicon Valley or remote

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.
On Apr 16, 2016 11:44 AM, “Hassan S.”
[email protected]

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 used the same exact same commands to install rbenv, ruby, and rails
both times however once the underlying permissions issue was solved
there were no further issues.

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 ([email protected])? 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.

On 17 April 2016 at 16:41, Ruruoni H. [email protected] 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 ([email protected])? 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

On Sun, Apr 17, 2016 at 8:41 AM, Ruruoni H. [email protected]
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.

Hassan S. ------------------------ [email protected]

twitter: @hassan
Consulting Availability : Silicon Valley or remote