rails_apps_composer icon indicating copy to clipboard operation
rails_apps_composer copied to clipboard

Add diagnostic error output when rvm gemset can't be changed.

Open JangoSteve opened this issue 11 years ago • 2 comments

This is from our discussion on #170. It's not ready to merge yet though. See the "TODO" in the extras recipe. I'm having issues with getting the path of where the rails_apps_composer new command is being run, in order to check for the presence of a .rvmrc or .ruby-gemset file in that directory.

The problem is using something like Dir.pwd from within the extras recipe runs it after the current directory has been changed to the new rails app's directory. And we don't want File.dirname(__FILE__), since they're not necessarily running the command from the file's directory.

I need to add something like this early on before the working directory is changed to the rails app's directory:

@@current_directory = Dir.pwd
def self.current_directory
  @@current_directory
end

...so that we can access it later from the extras recipe. I was thinking of putting it in the RailsWizard::Diagnostics module or somewhere like that, but not sure if that's the best place. Also, the RailsWizard module doesn't seem to be defined within the recipes, I'm guessing from the recipes being run via the erb template or something.

JangoSteve avatar Jan 29 '14 03:01 JangoSteve

Is your email address [email protected] as shown in your GitHub profile? Emailed you yesterday.

DanielKehoe avatar Jan 29 '14 19:01 DanielKehoe

Yeah, sorry, I'm writing a response. Just got really busy.

JangoSteve avatar Jan 29 '14 20:01 JangoSteve