Just wanted to make sure I''m on the right track... the general idea for source control with rails is to import the entire ~/myapp (for example) directory into whatever source control system used, correct? Does anybody have any suggestions for how to handle environmental differences on development boxes? For example, I host most of my sites using pair Networks. In their environment, I''ve had to install (obviously) my own version of ruby 1.8.2 and rails in $HOME/ruby-1.8.2... I more or less followed the instructions on the Wiki for this... However, for development, I use my Powerbook most often (which I can do sans Internet connection)... which has ruby 1.8.2 installed in /usr/local/bin... if I update the shebangs at the top of the dispatcher.* and the scripts/* directory to work with pair, it no longer works on my Powerbook. My directory structures are different enough, and while I could just setup /usr/home/blah/bin on my Powerbook, this seems kinda silly... there must be a better way, right? In addition, I want my database.yml to point to my Powerbook when working on it, so I don''t have to be connected to work on it. (I''m on too many planes, obviously...) Has anybody else solved this issue? I''m using CVS for my source... I''m sure there must be a clever/elegant way to do this, but I haven''t figured it out yet... The easy solution (of course) would be to just .cvsignore the files that are "localized." Any ideas would be very much appreciated. bs.
On Thu, 30 Dec 2004 12:00:49 -0700, Ben Schumacher <benschumacher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > For example, I host most of my sites using pair Networks. In their > environment, I''ve had to install (obviously) my own version of ruby > 1.8.2 and rails in $HOME/ruby-1.8.2... I more or less followed the > instructions on the Wiki for this... > > However, for development, I use my Powerbook most often (which I can > do sans Internet connection)... which has ruby 1.8.2 installed in > /usr/local/bin... if I update the shebangs at the top of the > dispatcher.* and the scripts/* directory to work with pair, it no > longer works on my Powerbook.Can''t you just use "#!/bin/env ruby" at the top of the scripts instead of the full path to your Ruby binary? Kind Regards and Happy New Year, Ed -- Pretty women make us buy beer, ugly women make us drink beer
That won''t work on pair''s site since my home directory ($HOME/bin) won''t be in the PATH for Apache... although, you''ve given me an idea. I wonder if I could make $HOME/bin part of the PATH through something in the .htaccess file. Something to look at.... On Thu, 30 Dec 2004 16:06:35 -0300, Edgardo Hames <ehames-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Thu, 30 Dec 2004 12:00:49 -0700, Ben Schumacher > <benschumacher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > For example, I host most of my sites using pair Networks. In their > > environment, I''ve had to install (obviously) my own version of ruby > > 1.8.2 and rails in $HOME/ruby-1.8.2... I more or less followed the > > instructions on the Wiki for this... > > > > However, for development, I use my Powerbook most often (which I can > > do sans Internet connection)... which has ruby 1.8.2 installed in > > /usr/local/bin... if I update the shebangs at the top of the > > dispatcher.* and the scripts/* directory to work with pair, it no > > longer works on my Powerbook. > > Can''t you just use "#!/bin/env ruby" at the top of the scripts instead > of the full path to your Ruby binary? > > Kind Regards and Happy New Year, > Ed > -- > Pretty women make us buy beer, ugly women make us drink beer >
I may be totally off-track (probably, since I work with windows most of the time) but couldn''t you put in an `ln -s` from /usr/local/bin/ruby to $HOME/ruby1.8.2/bin/ruby or some variant of using soft-links to simulate the same structure as you have on your production environment? P. On Thu, 30 Dec 2004 12:00:49 -0700, Ben Schumacher <benschumacher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Just wanted to make sure I''m on the right track... the general idea > for source control with rails is to import the entire ~/myapp (for > example) directory into whatever source control system used, correct? > > Does anybody have any suggestions for how to handle environmental > differences on development boxes? > > For example, I host most of my sites using pair Networks. In their > environment, I''ve had to install (obviously) my own version of ruby > 1.8.2 and rails in $HOME/ruby-1.8.2... I more or less followed the > instructions on the Wiki for this... > > However, for development, I use my Powerbook most often (which I can > do sans Internet connection)... which has ruby 1.8.2 installed in > /usr/local/bin... if I update the shebangs at the top of the > dispatcher.* and the scripts/* directory to work with pair, it no > longer works on my Powerbook. My directory structures are different > enough, and while I could just setup /usr/home/blah/bin on my > Powerbook, this seems kinda silly... there must be a better way, > right? In addition, I want my database.yml to point to my Powerbook > when working on it, so I don''t have to be connected to work on it. > (I''m on too many planes, obviously...) Has anybody else solved this > issue? I''m using CVS for my source... I''m sure there must be a > clever/elegant way to do this, but I haven''t figured it out yet... > > The easy solution (of course) would be to just .cvsignore the files > that are "localized." > > Any ideas would be very much appreciated. > > bs. > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
On Tue, 4 Jan 2005 14:10:51 +1100, Peter Sumskas <petersumskas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I may be totally off-track (probably, since I work with windows most > of the time) but couldn''t you put in an `ln -s` from > /usr/local/bin/ruby to $HOME/ruby1.8.2/bin/ruby or some variant of > using soft-links to simulate the same structure as you have on your > production environment?This is probably the best solution, or almost. On almost all unix systems /usr/local is owned by root so you won''t be able to stick a symlink in there. But he could link ~/ruby1.8.2/bin/ruby to /usr/local/bin/ruby on the powerbook. Seems like the way to go.> P. > > On Thu, 30 Dec 2004 12:00:49 -0700, Ben Schumacher > <benschumacher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Just wanted to make sure I''m on the right track... the general idea > > for source control with rails is to import the entire ~/myapp (for > > example) directory into whatever source control system used, correct? > > > > Does anybody have any suggestions for how to handle environmental > > differences on development boxes? > > > > For example, I host most of my sites using pair Networks. In their > > environment, I''ve had to install (obviously) my own version of ruby > > 1.8.2 and rails in $HOME/ruby-1.8.2... I more or less followed the > > instructions on the Wiki for this... > > > > However, for development, I use my Powerbook most often (which I can > > do sans Internet connection)... which has ruby 1.8.2 installed in > > /usr/local/bin... if I update the shebangs at the top of the > > dispatcher.* and the scripts/* directory to work with pair, it no > > longer works on my Powerbook. My directory structures are different > > enough, and while I could just setup /usr/home/blah/bin on my > > Powerbook, this seems kinda silly... there must be a better way, > > right? In addition, I want my database.yml to point to my Powerbook > > when working on it, so I don''t have to be connected to work on it. > > (I''m on too many planes, obviously...) Has anybody else solved this > > issue? I''m using CVS for my source... I''m sure there must be a > > clever/elegant way to do this, but I haven''t figured it out yet... > > > > The easy solution (of course) would be to just .cvsignore the files > > that are "localized." > > > > Any ideas would be very much appreciated. > > > > bs. > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Cheers Koz
On Mon, 3 Jan 2005 20:16:49 -0800, Michael Koziarski <koziarski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Tue, 4 Jan 2005 14:10:51 +1100, Peter Sumskas <petersumskas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I may be totally off-track (probably, since I work with windows most > > of the time) but couldn''t you put in an `ln -s` from > > /usr/local/bin/ruby to $HOME/ruby1.8.2/bin/ruby or some variant of > > using soft-links to simulate the same structure as you have on your > > production environment? > > This is probably the best solution, or almost. On almost all unix > systems /usr/local is owned by root so you won''t be able to stick a > symlink in there. But he could link ~/ruby1.8.2/bin/ruby to > /usr/local/bin/ruby on the powerbook. > > Seems like the way to go.Thanks for the feedback. The only problem with this solution is that I have to create a "home" directory on my Powerbook that maps to my home directory in the production environment on my hosting service. So to do this right, I''d need to create a direcotry (/home/username) for the new bin directory to live (OS X''s home directories live in /Users/username). Now this probably isn''t a huge deal, but it didn''t totally feel right. For the record (in case somebody else comes back with this question), here''s what I finally ended up doing. In place of the standard shebang (#!/usr/local/bin/ruby) in dispatch.cgi, I went with this: #!/bin/sh exec env PATH=/home/ghaven/bin:/usr/local/bin:/bin:/usr/bin ruby -x $0 "$@" #!ruby So basically I setup the PATH the way I want it and then reexec ruby based on that PATH. This makes it so my /home/ghaven/bin is the first search hit and when the script is running at my hosting service, it uses the correct ruby environment. Thanks for you comments! Cheers, Ben> > P. > > > > On Thu, 30 Dec 2004 12:00:49 -0700, Ben Schumacher > > <benschumacher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Just wanted to make sure I''m on the right track... the general idea > > > for source control with rails is to import the entire ~/myapp (for > > > example) directory into whatever source control system used, correct? > > > > > > Does anybody have any suggestions for how to handle environmental > > > differences on development boxes? > > > > > > For example, I host most of my sites using pair Networks. In their > > > environment, I''ve had to install (obviously) my own version of ruby > > > 1.8.2 and rails in $HOME/ruby-1.8.2... I more or less followed the > > > instructions on the Wiki for this... > > > > > > However, for development, I use my Powerbook most often (which I can > > > do sans Internet connection)... which has ruby 1.8.2 installed in > > > /usr/local/bin... if I update the shebangs at the top of the > > > dispatcher.* and the scripts/* directory to work with pair, it no > > > longer works on my Powerbook. My directory structures are different > > > enough, and while I could just setup /usr/home/blah/bin on my > > > Powerbook, this seems kinda silly... there must be a better way, > > > right? In addition, I want my database.yml to point to my Powerbook > > > when working on it, so I don''t have to be connected to work on it. > > > (I''m on too many planes, obviously...) Has anybody else solved this > > > issue? I''m using CVS for my source... I''m sure there must be a > > > clever/elegant way to do this, but I haven''t figured it out yet... > > > > > > The easy solution (of course) would be to just .cvsignore the files > > > that are "localized." > > > > > > Any ideas would be very much appreciated. > > > > > > bs. > > > _______________________________________________ > > > Rails mailing list > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > -- > Cheers > > Koz >