Conrad Taylor
2009-Feb-15 11:32 UTC
Using MacPorts To Install Ruby 1.9.1 and Rails 2.3.0 RC1
Using MacPorts To Install Ruby 1.9.1 and Rails 2.3.0 RC1 WARNING: If you want to live on the edge, please continue with the steps below. Also, please be aware that all gems are not fully compatible with Ruby 1.9.1 stable release (i.e. 1.9.1p0). Furthermore, this installation requires you to remove ALL Ruby related gems and ports because we are performing a clean install. Lastly, I am using an experimental machine (i.e. Apple PowerMac G5) to complete this task and I would NOT advise the below actions within a production environment. 0) Remove Previous Ruby Ports (i.e. ruby, ruby19, rb-*, and so on) and Gems a) Ports sudo port uninstall <port-name> sudo port clean <port-name> Note: Execute the above for all ruby related ports. b) Gems rm -rf /opt/local/lib/ruby rm -rf /opt/local/lib/ruby19 Note: You may not need to execute both commands and this really depends on what you have installed and how. 1) Remove Rake ( Optional If It Does Not Exist ) sudo rm -rf /opt/local/bin/rake 2) Install Ruby 1.9.1, SQLite3, and Mysql 5 Ports sudo port install ruby19 +nosuffix sudo port mysql5 +server sudo port sqlite3 Note: The above ruby19 install generates the required executables without the extension. 3) Install Rack, Rake, and Rails 2.3.0 Ruby Gems sudo gem install rack sudo gem install rake sudo gem install rails --source=http://gems.rubyonrails.org 4) Install SQLite 3 Ruby Gem sudo gem install sqlite3-ruby 5) Install MySQL 2.8.1 Ruby Gem sudo gem install kwatch-mysql-ruby -- --with-mysql-config=/opt/local/lib/mysql5/bin/mysql_config 6) Install Thin sudo gem install thin 7) Generate Rails Test Application rails test 8) Change To The Root Of Rails Application cd test 9) Start Thin script/server thin Note: The above command produces the above warning message: warning: encoding option is ignored - N 10) Navigate To The Site Using Your Browser: URL: http://localhost:3000 Result: You should see the "Rails Welcome aboard" page. 11) Now, Let Us Generate A Simple Blog script/generate scaffold blog title:string text:text Note: The above command produces the above warning message: warning: encoding option is ignored - N 12) Migrate The Database rake db:migrate 13) Navigate To The Site Using Your Browser: URL: http://localhost:3000/blogs and interact with the Rails application to verify that things are working. 14) If you made it this far, you are running Rails 2.3.0 RC1 and Ruby 1.9.1. Good luck, -Conrad --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Conrad Taylor
2009-Feb-16 02:13 UTC
Re: Using MacPorts To Install Ruby 1.9.1 and Rails 2.3.0 RC1
On Sun, Feb 15, 2009 at 3:32 AM, Conrad Taylor <conradwt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Using MacPorts To Install Ruby 1.9.1 and Rails 2.3.0 RC1 > > WARNING: If you want to live on the edge, please continue with the steps > below. Also, please be aware that all gems are not fully compatible with > Ruby 1.9.1 stable release (i.e. 1.9.1p0). Furthermore, this > installation requires you to remove ALL Ruby related gems and ports because > we are performing a clean install. Lastly, I am using an > experimental machine (i.e. Apple PowerMac G5) to complete this task and I > would > NOT advise the below actions within a production environment. > > 0) Remove Previous Ruby Ports (i.e. ruby, ruby19, rb-*, and so on) and > Gems > > a) Ports > > sudo port uninstall <port-name> > sudo port clean <port-name> > > Note: Execute the above for all ruby related ports. > > b) Gems > > rm -rf /opt/local/lib/ruby > rm -rf /opt/local/lib/ruby19 > > Note: You may not need to execute both commands and this really > depends on what you have installed and how. > > 1) Remove Rake ( Optional If It Does Not Exist ) > > sudo rm -rf /opt/local/bin/rake > > 2) Install Ruby 1.9.1, SQLite3, and Mysql 5 Ports > > sudo port install ruby19 +nosuffix >sudo port mysql5 +server>sudo port install mysql5 +server> sudo port sqlite3 >sudo port install sqlite3> > Note: The above ruby19 install generates the required executables > without the extension. > > 3) Install Rack, Rake, and Rails 2.3.0 Ruby Gems > > sudo gem install rack > sudo gem install rake > sudo gem install rails --source=http://gems.rubyonrails.org > > 4) Install SQLite 3 Ruby Gem > > sudo gem install sqlite3-ruby > > 5) Install MySQL 2.8.1 Ruby Gem > > sudo gem install kwatch-mysql-ruby -- > --with-mysql-config=/opt/local/lib/mysql5/bin/mysql_config > > 6) Install Thin > > sudo gem install thin > > 7) Generate Rails Test Application > > rails test > > 8) Change To The Root Of Rails Application > > cd test > > 9) Start Thin > > script/server thin > > Note: The above command produces the above warning message: > > warning: encoding option is ignored - N > > 10) Navigate To The Site Using Your Browser: > > URL: http://localhost:3000 > > Result: You should see the "Rails Welcome aboard" page. > > 11) Now, Let Us Generate A Simple Blog > > script/generate scaffold blog title:string text:text > > Note: The above command produces the above warning message: > > warning: encoding option is ignored - N > > 12) Migrate The Database > > rake db:migrate > > 13) Navigate To The Site Using Your Browser: > > URL: http://localhost:3000/blogs > > and interact with the Rails application to verify that things are > working. > > 14) If you made it this far, > > you are running Rails 2.3.0 RC1 and Ruby 1.9.1. > > Good luck, > > -Conrad > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jeff Schwab
2009-Mar-03 11:28 UTC
Re: Using MacPorts To Install Ruby 1.9.1 and Rails 2.3.0 RC1
On Feb 15, 9:13 pm, Conrad Taylor <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sun, Feb 15, 2009 at 3:32 AM, Conrad Taylor <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Using MacPorts To Install Ruby 1.9.1 and Rails 2.3.0 RC1Thank you. This was extremely helpful.> > sudo gem install kwatch-mysql-ruby -- > > --with-mysql-config=/opt/local/lib/mysql5/bin/mysql_config$ sudo gem install kwatch-mysql-ruby -- --with-mysql-config=/opt/local/ lib/mysql 5/bin/mysql_config Password: ERROR: could not find gem kwatch-mysql-ruby locally or in a repository Updating class cache with 2296 classes... $ sudo gem install kwatch-mysql-ruby --source=http://gems.github.com -- --with-mysql-config=/opt/local/lib/mysql5/bin/mysql_config Building native extensions. This could take a while... Successfully installed kwatch-mysql-ruby-2.8.1 1 gem installed --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jeff Schwab
2009-Mar-03 13:01 UTC
Re: Using MacPorts To Install Ruby 1.9.1 and Rails 2.3.0 RC1
On Feb 15, 9:13 pm, Conrad Taylor <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sun, Feb 15, 2009 at 3:32 AM, Conrad Taylor <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:For the archives:> > 9) Start Thin > > > script/server thinThin works, but WEBrick encounters an error: Internal Server Error undefined method `each'' See also: http://groups.google.com/group/rack-devel/browse_thread/thread/3e9d1bb16f977bd4 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Conrad Taylor
2009-Mar-03 14:45 UTC
Re: Using MacPorts To Install Ruby 1.9.1 and Rails 2.3.0 RC1
On Tue, Mar 3, 2009 at 5:01 AM, Jeff Schwab <jeff-0DHsjr3A8/m6BbymS3xAUA@public.gmane.org> wrote:> > On Feb 15, 9:13 pm, Conrad Taylor <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > On Sun, Feb 15, 2009 at 3:32 AM, Conrad Taylor <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > For the archives: > > > > 9) Start Thin > > > > > script/server thin > > Thin works, but WEBrick encounters an error: > > Internal Server Error > undefined method `each'' >Yes, this is the expected behavior when trying to use WEBrick instead of Thin. -Conrad --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jeff Schwab
2009-Mar-03 14:47 UTC
Re: Using MacPorts To Install Ruby 1.9.1 and Rails 2.3.0 RC1
Conrad Taylor wrote:> On Tue, Mar 3, 2009 at 5:01 AM, Jeff Schwab <jeff-0DHsjr3A8/m6BbymS3xAUA@public.gmane.org > <mailto:jeff-0DHsjr3A8/m6BbymS3xAUA@public.gmane.org>> wrote: > > > On Feb 15, 9:13 pm, Conrad Taylor <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > <mailto:conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> wrote: > > On Sun, Feb 15, 2009 at 3:32 AM, Conrad Taylor > <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <mailto:conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> wrote: > > For the archives: > > > > 9) Start Thin > > > > > script/server thin > > Thin works, but WEBrick encounters an error: > > Internal Server Error > undefined method `each'' > > > Yes, this is the expected behavior when trying to use WEBrick instead of > Thin.Expected by whom? It certainly wasn''t expected by me, and I suspect it won''t be expected by other newbies. Anyway, thanks again for the step-by-step instruction. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Conrad Taylor
2009-Mar-03 15:12 UTC
Re: Using MacPorts To Install Ruby 1.9.1 and Rails 2.3.0 RC1
On Tue, Mar 3, 2009 at 6:47 AM, Jeff Schwab <jeff-0DHsjr3A8/m6BbymS3xAUA@public.gmane.org> wrote:> > Conrad Taylor wrote: > > On Tue, Mar 3, 2009 at 5:01 AM, Jeff Schwab <jeff-0DHsjr3A8/m6BbymS3xAUA@public.gmane.org > > <mailto:jeff-0DHsjr3A8/m6BbymS3xAUA@public.gmane.org>> wrote: > > > > > > On Feb 15, 9:13 pm, Conrad Taylor <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > <mailto:conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> wrote: > > > On Sun, Feb 15, 2009 at 3:32 AM, Conrad Taylor > > <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <mailto:conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> wrote: > > > > For the archives: > > > > > > 9) Start Thin > > > > > > > script/server thin > > > > Thin works, but WEBrick encounters an error: > > > > Internal Server Error > > undefined method `each'' > > > > > > Yes, this is the expected behavior when trying to use WEBrick instead of > > Thin. > > Expected by whom? It certainly wasn''t expected by me, and I suspect it > won''t be expected by other newbies. Anyway, thanks again for the > step-by-step instruction.It was expected by me. If WEBrick was working, I would had added the following use case for step (9): script/server instead of script/server thin Furthermore, WEBrick and Mongrel wasn''t updated to support ruby 1.9.1 at the time I was putting this tutorial together. Lastly, I plan to turn these instructions into a blog post so that I can easily update it. -Conrad --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jeff Schwab
2009-Mar-03 15:23 UTC
Re: Using MacPorts To Install Ruby 1.9.1 and Rails 2.3.0 RC1
Conrad Taylor wrote:> If WEBrick was working, I would had added the > following use case for step (9): > > script/server > > instead of > > script/server thinFair enough. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Fernando Perez
2010-Jun-19 21:17 UTC
Re: Using MacPorts To Install Ruby 1.9.1 and Rails 2.3.0 RC1
Google brought me here.> 2) Install Ruby 1.9.1, SQLite3, and Mysql 5 Ports > > sudo port install ruby19 +nosuffix > sudo port mysql5 +server > sudo port sqlite3 > > Note: The above ruby19 install generates the required executables > without the extension.I installed ruby 1.9.1 with the 1.9 suffix, and I think ./script/server is confused and is trying to run the old ruby stuff that ships with OSX. Does it mean I have to reinstall everything from scratch with the +nosuffix flag? Thanks -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fernando Perez
2010-Jun-20 11:50 UTC
Re: Using MacPorts To Install Ruby 1.9.1 and Rails 2.3.0 RC1
> I installed ruby 1.9.1 with the 1.9 suffix, and I think ./script/server > is confused and is trying to run the old ruby stuff that ships with OSX. > Does it mean I have to reinstall everything from scratch with the > +nosuffix flag? > > ThanksI confirm I needed to reinstall ruby with +nosuffix. Now it all works, well except ruby-debug which won''t compile :-( -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Conrad Taylor
2010-Jun-20 17:16 UTC
Re: Re: Using MacPorts To Install Ruby 1.9.1 and Rails 2.3.0 RC1
Sent from my iPhone On Jun 20, 2010, at 4:50 AM, Fernando Perez <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> >> I installed ruby 1.9.1 with the 1.9 suffix, and I think ./script/ >> server >> is confused and is trying to run the old ruby stuff that ships with >> OSX. >> Does it mean I have to reinstall everything from scratch with the >> +nosuffix flag? >> >> Thanks > > I confirm I needed to reinstall ruby with +nosuffix. Now it all works, > well except ruby-debug which won''t compile :-(If you''re using Rails 3, it is recommended that you use Ruby 1.9.2. If this is the case, then you might want to use RVM for installing Ruby by doing the following: rvm install 1.9.2- head Good luck, -Conrad> -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google > Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails- > talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > . > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en > . >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fernando Perez
2010-Jun-20 18:54 UTC
Re: Re: Using MacPorts To Install Ruby 1.9.1 and Rails 2.3.0 RC1
> If you''re using Rails 3, it is recommended that you use Ruby 1.9.2. > If this is the case, then you might want to use RVM for installing > Ruby by doing the following: > > rvm install 1.9.2- head > > Good luck, > > -ConradI''m still running 2.3.8 until 3 goes official. I''ll give a try at RVM. By the way my machine runs Tiger on a PowerPC, is there any issue I might run into? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Conrad Taylor
2010-Jun-20 19:11 UTC
Re: Re: Re: Using MacPorts To Install Ruby 1.9.1 and Rails 2.3.0 RC1
On Sun, Jun 20, 2010 at 11:54 AM, Fernando Perez <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>wrote:> > If you''re using Rails 3, it is recommended that you use Ruby 1.9.2. > > If this is the case, then you might want to use RVM for installing > > Ruby by doing the following: > > > > rvm install 1.9.2- head > > > > Good luck, > > > > -Conrad > > I''m still running 2.3.8 until 3 goes official. I''ll give a try at RVM. > > By the way my machine runs Tiger on a PowerPC, is there any issue I > might run into? >If you''re using Rail 2.3.8, I would still recommend using Ruby 1.9.2 instead of Ruby 1.9.1. Why? http://www.infoq.com/news/2010/03/ruby-192-schedule Next, I would recommend upgrading to Leopard but you should be good with Tiger. Good luck, -Conrad --> Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.