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

Fallback to locally preferred ruby when running from user's home #1011

Merged
merged 4 commits into from
Mar 3, 2016

Conversation

hzulla
Copy link
Collaborator

@hzulla hzulla commented Feb 19, 2016

ruby, how shall I call thee?
Oh, multifaceted beast of a dozen install locations, what is thy name?

So, #835 seemed like a good idea at the time, but maybe it's better to only use the system's /usr/bin/ruby when Sonic Pi is actually installed in /opt/(Rasbpian) or in /usr/bin/(normal Linux).

Otherwise, the user probably expects to use the preferred ruby in the current path settings.

This should help fix the issues reported by users who had their own rvm ruby installed locally.

The most problematic part of this patch may be that it falls back to "ruby" on all platforms, not just on Raspberry as previously. I guess that this would help with users on OS X compiling their own Sonic Pi on their box, but this needs to be discussed prior to merging.

@hzulla
Copy link
Collaborator Author

hzulla commented Feb 22, 2016

@wdenton
Copy link

wdenton commented Feb 22, 2016

Wonderful! It fixes my problem. (I suspect #918 could also be closed because of recent changes, too).

@hzulla hzulla added the boot label Mar 3, 2016
samaaron added a commit that referenced this pull request Mar 3, 2016
Fallback to locally preferred ruby when running from user's home
@samaaron samaaron merged commit 9f2a90c into sonic-pi-net:master Mar 3, 2016
@samaaron
Copy link
Collaborator

samaaron commented Mar 3, 2016

Thanks! I think the extra feedback will be very useful for future debugging...

@JeroennC
Copy link
Contributor

Hi @hzulla!

The last commit adding errors to core.rb made me realize that the ruby_gem_api_path points to for instance: rb-native/windows/2.1.0/
However, on my local (working) installation from before this commit, my file structure looked like: native/windows/ruby. I have now changed core.rb to point correctly. How have you handled this? Is your file structure different?

Thanks!

@hzulla
Copy link
Collaborator Author

hzulla commented Mar 11, 2016

native/windows/ruby is the directory of Sonic Pi's own copy of ruby on Windows. The other directory is the location of the Sonic Pi specific gems. The patch shouldn't have changed that.

@JeroennC
Copy link
Contributor

I see.. I dont have this directory though. It seems my gems are stored in native/windows/ruby/lib/ruby/gems.

@hzulla
Copy link
Collaborator Author

hzulla commented Mar 12, 2016

The location of the Sonic Pi gems has been changed back in November: #846

@hzulla
Copy link
Collaborator Author

hzulla commented Mar 21, 2016

Ok, as discovered by @rbnpi and @JeroennC , this line breaks the Windows install of Sonic Pi at the moment because the Windows distribution uses a different directory layout.

@jweather - you're in charge of the Windows package. What's your opinion on this? Do you want to move the gems to rb-native/windows/#{ruby_api}/ or can I change this patch so that it follows the Windows structure?

@jweather
Copy link
Contributor

Let's keep the current structure, it's fragile enough as it is.

@hzulla hzulla deleted the ruby-path branch June 24, 2016 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants