Run "restorecon -Rv /opt/rh/ruby193 > /tmp/files_changed.txt". That
should set the type for ruby to match your Broker host. SELinux could
be preventing the SCL from loading inside the gear. You should check
/var/log/audit/audit.log for denials as well.

This is definitely a problem. The ruby193 scl is not being enabled
properly. I may have time to investigate later but I would suggest
looking at file modes, ownership and selinux context for the paths
mentioned in /opt/rh/ruby193/enable.

Inside and outside "which oo-ruby" command are both /usr/bin/oo-ruby.
Thanks Dude,
Inside(gear): "which ruby" /usr/bin/ruby
Outside(node host): "which ruby" /opt/rh/ruby193/root/usr/bin/ruby
but I can not exec "/opt/rh/ruby193/enable", it will show Permission Denied.

Inside my gear "ls -lZ /opt/rh/ruby193/enable" shows:
-rw-r--r--. root root system_u:object_r:usr_t:s0
/opt/rh/ruby193/enable
I'm guessing you can't run that from your gear. What does it show as
root?

[root @node ~]# rpm -qf /usr/bin/oo-ruby
openshift-origin-util-scl-1.16.1-1.git.0.dc957bd.el6.noarch
I only have one node.
What I mean previously is that:
when I ssh into my node host, "oo-ruby --version" output is 1.9.3
when I ssh into my gear, "oo-ruby --version" output is 1.8.7

Are they pointing to the same oo-ruby? Please report the output of
'which oo-ruby' inside and outside the gear. I'll take a look at the
origin codebase shortly to see if something has changed upstream that
I'm not aware of.

Yes, a syntax error when I run "/usr/bin/oo-ruby -wcc /usr/bin/gear"
and inside the gear "oo-ruby --version" is 1.8.7
I have tried to set the default ruby version on the node, and now the node host ruby version is 1.9.3 but the gear's is 1.8.7.

Here's a few follow up questions:
What OS are you running?
Can you paste the output of 'rpm -qf /usr/bin/oo-ruby' ?
In your previous reply you reported:
[root node -]# /usr/bin/env oo-ruby --version
ruby1.9.3p448 (2013.-06-27) [x86_64-linux]
Are you saying that you get a different oo-ruby when you ssh into a
gear?
How many Nodes do you have? Could your gear be on a node with the
wrong oo-ruby installed? (we have a version for OS's that don't need
the SCL ruby)

Hi all.
Have anybody suffer this problem, too?
I can create app.
But, when I want to restart the app, it occur some error.
I modify some files like index.html in jbosseap app. When I visit the app website, nothing to be changed.
So I restart the app through web-console.
It show me it is restart successfully, but it still have no changes.
Then I ssh login the app and use command "gear restart", some error occur:
#################################################################################################
[jbosseap-test.example.com 5306e5f56892df605b00009a]\> gear restart
/usr/bin/gear:146: syntax error, unexpected ':', expecting ')'
@container.pre_receive(out: $stdout,
^

When you ssh into your gear what does the following command return:
/usr/bin/env oo-ruby --version
I wonder if somehow in your environment ruby 1.8 is being used. That
code is using ruby 1.9+ hash syntax.