railsinstaller / railsinstaller-nix

RailsInstaller for OSX/Linux
http://railsinstaller.org/
65 stars 12 forks source link

fix quoting of rvm_configure_env in /etc/rvmrc for rvm 1.16 #10

Closed mpapis closed 11 years ago

thejoecarroll commented 11 years ago

Just ran into this. For the benefit of anyone else who reads this, the workaround for now is to manually fix the file to read as follows (thanks to @mpapis ): https://gist.github.com/0d2c94f0f1b0ddffdf1b

Dan2552 commented 11 years ago

same problem, cheers for the manual fix

jamiescript commented 11 years ago

My file previously read like this... rvm_configure_env=('LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include') Note the single string and not separate strings as suggested in @thejoecarroll gist

Thanks!

jimross commented 11 years ago

I am running into this same problem, but as a beginner I am not sure where to go to make these changes.

mpapis commented 11 years ago

@jimross run:

rvm get head

and make sure to read all the outputs, hint: check for red color - it might be hard if you are colorblind.

Dan2552 commented 11 years ago

@jimross edit /etc/rvmrc with your favorite text editor and replace the contents with the gist's content

jimross commented 11 years ago

I ran 'rvm get head' and it gave me the follow which I was able to copy/paste to resolve the issue. Thanks!

* WARNING: you have 'rvm_configure_env' in /etc/rvmrc, run the following to fix:

      sudo sed -i'' -e "s#rvm_configure_env=('LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include')#rvm_configure_env=('LDFLAGS=-L/opt/sm/pkg/active/lib' 'CFLAGS=-I/opt/sm/pkg/active/include' 'CPATH=/opt/sm/pkg/active/include')#" /etc/rvmrc
jimross commented 11 years ago

Just for future reference, how should I manually navigate to /etc.rvmrc on a Mac? I've tried searching for it with finder, but that doesn't work.

Dan2552 commented 11 years ago

you can change your Finder preferences to show your disk in the devices sidebar. Or in terminal you can type open /etc or even open /etc/rvmrc will just open the file straight in a textedit

jimross commented 11 years ago

When I run 'open /etc/rvmrc' I get: The file /etc/rvmrc does not exist.

When I run 'open /etc' I see the etc folder, but no rvmrc file.

anderskitson commented 11 years ago

I get the same rvmrc does not esixst

mpapis commented 11 years ago

try:

sudo sed -i'' -e "s#rvm_configure_env=('LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include')#rvm_configure_env=('LDFLAGS=-L/opt/sm/pkg/active/lib' 'CFLAGS=-I/opt/sm/pkg/active/include' 'CPATH=/opt/sm/pkg/active/include')#" /etc/rvmrc

Meekohi commented 11 years ago

This bug ruined my day.

mpapis commented 11 years ago

@Meekohi I'm working on a new version already, unfortunately I had to restore whole system and it takes more then expected

Meekohi commented 11 years ago

Thanks mpapis ;) It happens -- just took me a while to track down this report and make the fix.

Bw00d commented 11 years ago

Thanks, that did it for me.

tiinus commented 11 years ago

Thanks! Creating /etc/rvmrc (it didn't exist on my machine) and inserting the lines above solved it for me. I'm now running 1.9.3p392!

mpapis commented 11 years ago

@tiinus so you do not have Railsinstaller-OSX and it still solves your problem?