Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JangoSteve
Copy link
Contributor

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.

@DanielKehoe
Copy link
Member

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

@JangoSteve
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants