SymptomsLatest Ruby on Rails was installed and configured according to H-Sphere documentation, but when trying to enable this resource in H-Sphere the following error appears in logs:
Could not initialize /hsphere/local/home/user/domain.com
CauseThis is caused by the changed syntax of rails in recent releases of Ruby on Rails while H-Sphere still uses the syntax of rails < 3.0.3 when creating an application.
ResolutionIf you are installing the latest ruby, gems and rails packages it is needed to edit /hsphere/shared/scripts/rails-install.sh
if ! /hsphere/shared/bin/sudo -H -u $USER rails -q $OPT "$USERHOME/ruby/$DOMAIN" > /dev/null 2>&1; then
if ! /hsphere/shared/bin/sudo -H -u $USER rails new "$USERHOME/ruby/$DOMAIN" -q $OPT > /dev/null 2>&1; then
Make sure to delete /hsphere/local/home/user/ruby/domain.com before trying to enable Ruby on Rails on this domain again, see this KB article for details