"Command not found : variable" when setting up from scratch #50

Closed
ebreton opened this Issue Sep 10, 2012 · 9 comments

Projects

None yet

6 participants

@ebreton
ebreton commented Sep 10, 2012

Hello,

I am following the https://rvm.io/deployment/best-practices/ step by step and I come accross a unfound command...
I have tried both on a brand new Debian 6.0 and ubuntu 12.04

Here is the command and output :

sm rails setup
Setting up ~/.smrc
/opt/sm/sets/active/ruby/rails/bin/smrc:7: command not found: variable
Configuring ~/.smrc
/opt/sm/sets/active/ruby/rails/bin/smrc:29: command not found: variable
/opt/sm/sets/active/ruby/rails/bin/smrc:48: command not found: variable
/opt/sm/sets/active/ruby/rails/bin/smrc:57: command not found: variable
Configuring profiles
Configuring profiles (~/.rvmrc, ~/.bashrc ~/.bash_profile)
Configuring ~/shared
Setting up shared path (~/shared)
/opt/sm/sets/active/ruby/rails/bin/shared/configure:7: command not found: variable

FAIL(path): Path to exists must be given.

   +#   source file                                                  # function()                                                      
==================================================================================================================================================================================
vi +330 /opt/sm/core/sm/shell/log/functions                          # __sm.log.fail                                                      
vi +143 /opt/sm/core/api/shell/paths/functions                       # paths                                                      
vi +47  /opt/sm/core/api/shell/paths/functions                       # path                                                      
vi +10  /opt/sm/sets/active/ruby/rails/bin/shared/configure          # /opt/sm/sets/active/ruby/rails/bin/shared/configure                                                      
vi +417 /opt/sm/core/sm/shell/log/functions                          # __sm.actions.source                                                      
vi +185 /opt/sm/core/internal/shell/extensions/execution/functions   # __sm.extension.run                                                      
vi +151 /opt/sm/core/sm/shell/core/initialize                        # /opt/sm/core/sm/shell/core/initialize                                                      
vi +41  /opt/sm/bin/sm                                               # /opt/sm/bin/sm                                                      
==================================================================================================================================================================================
Configuring database
Configuring database.yml (~/shared/config/database.yml)
mkdir: cannot create directory `/config': Permission denied
2012/09/10 12:39:56 OUTPUT FILE ERROR:open /config/database.yml: no such file or directory
ERROR(log): There was an error rendering the template!
Configuring ~/.rvmrc
Installing deploy hooks ~/shared/deploy/{before_release, after_release}.
mkdir: cannot create directory `/deploy': Permission denied
2012/09/10 12:39:56 OUTPUT FILE ERROR:open /deploy/before_release: no such file or directory
ERROR(log): There was an error rendering the template!

I can't find where to install the command "variable" from..

Thanks for your help !
Emmanuel

@brianmcgee

I've also hit the same issue. Gist is here: https://gist.github.com/3912618

@mpapis
Member
mpapis commented Oct 19, 2012

try after this sm/sm-ruby@2603999, you need to update ruby set:

sm set update ruby
@brianmcgee

Different error now. I've updated the gist with the new error trace and my .smrc file

@brianmcgee

I manually exported shared_path as ~/shared and it progressed as far as cloning my repo and installing rvm. Bombed out setting up the gemset though. I'm thinking there's something fundamentally broken, possibly with my setup otherwise others would be complaining a lot more.

@brianmcgee

Tried a fresh account and got the same result.

It says it's configuring shared_path but then it seems to fail. My guess is whatever component is used for that is broken in some way. Still surprised no one else is seeing this.

If it helps at all I'm trying this on Mac OS Lion 10.7.5

@mpapis
Member
mpapis commented Oct 23, 2012

this could be RVM related - at least half of the errors should be fixed with update of RVM:

rvm get head
@steveplatz

I also wanted to mention that I'm running into the same issue on a fresh install of Ubuntu 12.04.1. I've followed what @brianmcgee mentioned and added shared_path to my smrc file and was able to get many of the error/warning messages to go away. However, I'm now stuck getting the Path to exists must be given error and cannot continue. I created gist https://gist.github.com/4017513, which shows what I'm seeing.

@wayneeseguin
Member

Thanks Steven!
Thank you very much for the report! Due to both age and working on version 1.0.0 in go I am closing all current issues.

@sixtyfive

@wayneeseguin, you closed this a couple of years ago now. https://rvm.io/deployment/best-practices still points to here, though. What are the new best practices?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment