Jeff Mallatt
2006-Jul-05 17:07 UTC
[Rails] [Newbie] Generated files don''t use Windows end-of-lines.
I''m trying to use Rails on Windows 2000. I''m running into an immediate problem in that all the files generated by Rails use the UNIX end-of-line convention instead of the Windows end-of-line convention. A non-compliant end-of-line convention will break any number of tools I may wish to use to manage these files. Is there a way to get Rails to emit Windows-compliant end-of-lines? Thanks. Details follow... I used the one-click installer for Ruby on Windows. Here''s the version it reports: ruby 1.8.4 (2005-12-24) [i386-mswin32] I then did "gem install rails --include-dependencies". And, here''s the version it reports: Rails 1.1.4 All looked good. Now, working my way through the Agile Web Development with Rails book, I did: rails demo cd demo ruby script\generate controller Say Which generated a bunch of directories/files, but all of the files use the UNIX end-of-line convention. -- Posted via http://www.ruby-forum.com/.
Brian Hogan
2006-Jul-05 17:40 UTC
[Rails] [Newbie] Generated files don''t use Windows end-of-lines.
Jeff: Forgive me if I come across rather rude; that is not my intent. The best way to handle that is to use an editor or IDE that supports different encoding modes. I don''t know what tools you use, but I know Eclipse + RDT, RadRails, Notepad++, ArachnoRuby, Komodo, Dreamweaver, and countless other tools don''t have a problem reading the Unix newlines. It sounds like your toolset is "non-compliant" and not Rails. In fact, if you ever need to deploy on Linux, using an editor that will handle these newlines properly will be a huge timesaver. I''ve spent a good deal of time developing and deploying on Windows and have had very few issues. The newline issue is easily handled by using an editor that can not only interpret but also write the proper newline.. Good luck! On 7/5/06, Jeff Mallatt <jjm@codewell.com> wrote:> > I''m trying to use Rails on Windows 2000. I''m running into an immediate > problem in that all the files generated by Rails use the UNIX > end-of-line convention instead of the Windows end-of-line convention. A > non-compliant end-of-line convention will break any number of tools I > may wish to use to manage these files. > > Is there a way to get Rails to emit Windows-compliant end-of-lines? > > Thanks. > > Details follow... > > I used the one-click installer for Ruby on Windows. Here''s the version > it reports: > > ruby 1.8.4 (2005-12-24) [i386-mswin32] > > I then did "gem install rails --include-dependencies". And, here''s the > version it reports: > > Rails 1.1.4 > > All looked good. Now, working my way through the Agile Web Development > with Rails book, I did: > > rails demo > cd demo > ruby script\generate controller Say > > Which generated a bunch of directories/files, but all of the files use > the UNIX end-of-line convention. > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060705/f1efa9c5/attachment.html