[Rails] Re: Frustrations w/2.3.x and ruby 1.9.(2|3)

2012-02-11 Thread blasterpal
I feel your pain. I've been in the midst of similar tasks for a large
2.3.11 codebase. Here are a couple of links that might help:


http://gembundler.com/compatibility
http://blog.rubygems.org/2011/08/31/shaving-the-yaml-yak.html

I'd take it one gem at a time.

Good luck.
H
On Feb 10, 3:21 pm, Meech meech...@gmail.com wrote:
 Wow, what a clusterf(#$.     I am getting ready to write a new app in
 3.x so I figured I would upgrade a legacy app to run on 1.9.x to ease
 deployment, eliminate proxying requests, gain performance, etc, etc.

 What a nightmare.

 RubyGems 1.8 throws up all over the screen complaining about it's own
 code.   The RubyGem poobah apparently thinks this is a good thing/
 won't fix.
 Certain versions of rubygems don't like certain versions of rails.
 Rack apparently made a change to set_cookies! which breaks rails
 (expiry)
 Bundle doesn't like using rails from git, because there are no
 gemspecs
 etc, etc, etc.

 I was hoping to use the latest version of ruby, rack, and rubygems
 with a 2.3.x app.   Starting to think it's impossible.   In order to
 use 1.9.3 I think (haven't actually tried this variant yet) I have to
 use a downgraded rubygems + 2-3-stable branch from github + stop using
 bundle.  Maybe.

 I liked the whole convention over configuration thing, and it just
 works.   Not anymore, it looks like i've descended into a
 propellerhead's version of DLL hell.

 That is all.

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Best book to learn RoR??

2009-08-04 Thread blasterpal

I vote Agile Web Development with Rails as well. Get latest version.
It does not cover Rails 3 but you can upgrade your brain later.
Many,many companies/sites will continue to be using Rails 2 for a
while.

If you are concerned about learning Rails 3 now: http://www.manning.com/katz/

H
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Scan IP Range In Ruby on Rails

2009-06-29 Thread blasterpal

Are you trying to secure your Rails app via IP?

You can use request headers in Rails to compare. You would have to use
regex to compare for specific range. But it would be wiser to keep
this out of Rails and do in Apache mod_proxy or whatever else you are
proxy-ing with.

H

On Jun 29, 6:37 am, Ruby On rails rails-mailing-l...@andreas-s.net
wrote:
 Is there any method to scan ip range in ruby on rails !
 --
 Posted viahttp://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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: including a blank in a dropdown

2009-05-10 Thread blasterpal

You can't call empty? method on a nil object. You must check that it
exists first. This is super simple in Ruby. Just try and call the
object, if it's nil it evaluates false, if it exists, it is true:

  unless params[:location][:id] || params[:location][:id].empty?

Precendence will short circuit on a nil first and never try and call
the empty? method. But If the params[:location][:id] exists, then you
CAN check for empty?

On May 10, 12:09 pm, bingo bob rails-mailing-l...@andreas-s.net
wrote:
 That looks great to me, so I'm now uber confused.

 The error I get is this...

 You have a nil object when you didn't expect it!
 You might have expected an instance of ActiveRecord::Base.
 The error occurred while evaluating nil.[] (it's erroring on the unless
 params[:location][:id].empty? line)

 with no params.

 I implemented the following.

 class WelcomeController  ApplicationController
   def index

       unless params[:location][:id].empty?
         # location is set, so find it!
         @location = Location.find(params[:location][:id])
       else
         # location is empty, so just get all the teachers
         @teachers = Teacher.all
       end

   end

 end

 % title Welcome %

 pFind me in app/views/welcome/index.html.erb/p

 p
 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
 tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
 veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
 commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
 velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
 occaecat cupidatat non proident, sunt in culpa qui officia deserunt
 mollit anim id est laborum.
 /p

 hr

 % form_tag do %

   %= select(location, id, Location.all.collect {|l| [ l.name, l.id
 ]}, {:prompt = 'Any Location'}) %
   %= submit_tag go %

 % end -%

 %= render :inline = params.inspect %

 hr

 % if @teachers %
   % for teacher in @teachers %
     %= link_to [teacher.first_name + ' ' + teacher.last_name], teacher
 %br
     %= teacher.email %br
     Location: %= teacher.location.name %br
     Languages:
     % for language in teacher.languages %
     %= language.name %
     % end %

     hr
   % end %

 % end %

 routes.

 ActionController::Routing::Routes.draw do |map|
   map.resources :languages

   map.resources :locations

   map.resources :teachers, :member = {:no_more_photo = :put}

   map.login 'login', :controller = 'teacher_sessions', :action = 'new'
   map.logout 'logout', :controller = 'teacher_sessions', :action =
 'destroy'

   map.resources :teacher_sessions

   # The priority is based upon order of creation: first created -
 highest priority.

   # Sample of regular route:
   #   map.connect 'products/:id', :controller = 'catalog', :action =
 'view'
   # Keep in mind you can assign values other than :controller and
 :action

   # Sample of named route:
   #   map.purchase 'products/:id/purchase', :controller = 'catalog',
 :action = 'purchase'
   # This route can be invoked with purchase_url(:id = product.id)

   # Sample resource route (maps HTTP verbs to controller actions
 automatically):
   #   map.resources :products

   # Sample resource route with options:
   #   map.resources :products, :member = { :short = :get, :toggle =
 :post }, :collection = { :sold = :get }

   # Sample resource route with sub-resources:
   #   map.resources :products, :has_many = [ :comments, :sales ],
 :has_one = :seller

   # Sample resource route with more complex sub-resources
   #   map.resources :products do |products|
   #     products.resources :comments
   #     products.resources :sales, :collection = { :recent = :get }
   #   end

   # Sample resource route within a namespace:
   #   map.namespace :admin do |admin|
   #     # Directs /admin/products/* to Admin::ProductsController
 (app/controllers/admin/products_controller.rb)
   #     admin.resources :products
   #   end

   # You can have the root of your site routed with map.root -- just
 remember to delete public/index.html.
   # map.root :controller = welcome
   map.root :controller = welcome

   # See how all your routes lay out with rake routes

   # Install the default routes as the lowest priority.
   # Note: These default routes make all actions in every controller
 accessible via GET requests. You should
   # consider removing the them or commenting them out if you're using
 named routes and resources.
   #map.connect ':controller/:action/:id'
   #map.connect ':controller/:action/:id.:format'
 end

 ==

 --
 Posted viahttp://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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 

[Rails] Re: Catch the browser close event

2009-03-02 Thread blasterpal

I second Bill.

H

On Mar 2, 8:59 pm, bill walton bwalton...@gmail.com wrote:
 Hello Hiro,

 On Mon, 2009-03-02 at 08:04 -0800, Hiro wrote:
  Is there a way to catch the browser close event?

 There is no reliable way to do this.

  I want it to end the users session, because if the
  user close the browser and try to sign in, I get the
  user already logged message.

 Do you want closing the browser to end the user's session?  Or are you
 just wanting to avoid the user trying to sign in and getting an error
 message when they already have a valid session and don't need to sign
 in?  The first is difficult.  The second, easy.  Let us know.

 Best regards,
 Bill
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: favored development environment

2009-02-09 Thread blasterpal

AgileHack,

I work in an in-house Rails shop for a fairly large site (we are a
team of about 7 developers, not including operations and QA).  We use
OSX on PowerMacs and Mac Minis with Textmate and git. Some are
starting to poke around with MacVim and others swear by Netbeans.
Secondly, everyone uses OSX for dev personally except for one guy who
uses Debian.

Largely, everyone chooses OSX and Macs, its not a forced decision. All
the vendors who come in to staff augment or work on other projects
from respectable Ruby/Rails shops always show up with Macbooks.

For what it's worth, I don't use a MacBook pro, never have. I think
they are too much $$ for RoR dev. I use a bottom of the line with
extra RAM.

H
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Comparisons between mod_ruby and FastCGI

2008-11-28 Thread blasterpal

I will say stay away from FastCGI, that's all.


H

On Nov 28, 3:43 pm, Frederick Cheung [EMAIL PROTECTED]
wrote:
 Don't think anyone uses either of those these days. It's either  
 mod_rails or mongrel

 Sent from my iPhone

 On 28 Nov 2008, at 17:53, Matt [EMAIL PROTECTED] wrote:



  Hello all,

  I'm a new Ruby on Rails developer who is working on applications for
  several different clients using the Ruby on Rails framework. The
  question that I've got to pose all of you concerns the differences
  between mod_ruby and FastCGI. I'm thinking about trying to get my
  webhost to install mod_ruby because it would run lightyears faster,
  but there's something I found about mod_ruby that they would probably
  take issue with.

  On the Wikipedia article for mod_ruby, it reads: Its drawback is that
  the characteristic sharing of classes among Apache processes is not
  safe for multiple applications. However, there is no citation.

  So here's my question - is this a serious safety concern? If so, how
  did the developers of mod_php get around this problem? Is there
  another, more secure, solution to running ruby apps on a web server
  that is faster than mod_ruby?

  Thanks in advance,
  Matt
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Problem with creating migration files

2008-11-26 Thread blasterpal

Once a migration is created with the scaffold command it cannot be
altered with the scaffold command. Only manually. However, once a
migration file has been used by running rake db:migrate, you are not
recommended to alter this file in a real production site, but rather
you must make a new migration file, but not using scaffold:

script/generate migration AddPasswordColumn

This command would create a new migration file where you can add/alter/
delete database columns and schema.


However, if you are testing and want to redo your first scaffold
command:

rake db:migrate VERSION=0

And now edit the file and rerun:

rake db:migrate

Hank

On Nov 26, 6:51 am, Indu RS [EMAIL PROTECTED] wrote:
 Hello ,

   I am a ROR beginner. I have a controller named users and the
 corresponding view,model created using the command ruby script/generate
 scaffold user name:string.By running the command rake db:migrate will
 create the table users with a field name and the migration file
 created automatically is 001_create_users.rb. Now when I tried to add
 one more column password ,by creating a new migration file using the
 command ruby script/generate migration create_users an error is
 occuring
 like Another file named 001_create_users.rb already exists. May any
 one let me know what is the problem? I am using the right way or not?

 Thanks in advance
 Indu
 --
 Posted viahttp://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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Help in writing unit test cases

2008-11-26 Thread blasterpal

Hello,

If you are using scaffolding to create your models and controllers
then you have the test files for each model and controller already
created within test directory.

Thie rails wiki is always a good starting point:

http://wiki.rubyonrails.org/rails/pages/HowtoUnitTest

Hank

On Nov 26, 7:46 am, sumanth [EMAIL PROTECTED] wrote:
 Hi,

 I've been working on ROR just for 4 months. I am naive in writing test
 cases. I heard that one has to start with unit tests. So, I am
 confused to where and how to start with. Any materials available or
 any guides which helps me with some examples also.

 Thanks in advance
 sumanth
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Where to call a global variable?

2008-11-16 Thread blasterpal

I have always like constants for global variables. It comes from
programming C I think. Having model related constants in your
controllers is really not the MVC way IMHO. A constant is easy to
setup in ActiveRecord and in my opinion are much more readable. And
guess what, I actually did it with an Article model too! =

class Article  ActiveRecord::Base
...
ARTS_CATEGORY = Category.find(:first, :conditions = ['name LIKE ?',
'arts%']).id
  OPINE_CATEGORY = Category.find(:first, :conditions = ['name
LIKE ?', 'opine%']).id
  DISTRACTIONS_CATEGORY = Category.find(:first, :conditions = ['name
LIKE ?', 'distra%']).id
  NEWS_POLITICS_CATEGORY = Category.find(:first, :conditions = ['name
LIKE ?', 'news%']).id

...

So in my controllers I use a method like this (the actual method is a
shared method for all types longer, this is for readability:
...
  def arts_archive
Article.find_by_category_id(Article::ARTS_CATEGORY)
  end
...


On Nov 15, 2:47 pm, Mario Peterscheck [EMAIL PROTECTED]
s.net wrote:
 ... thanks Pau,

 indeed you're right, and by the way, the same way has been suggested in
 a different board.

 Thanks alot, greetings
 Mayo
 --
 Posted viahttp://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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Simple Captcha

2008-11-12 Thread blasterpal

You should also check out negative capcha it is invisible to user
and offers a better experience. I have a few sites using this and I
think its worth a look too:

http://subwindow.com/articles/18


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Webservice with Ruby

2008-11-07 Thread blasterpal

http://www.texperts.com/2007/12/21/using-action-web-service-with-rails-20/

On Nov 7, 12:23 pm, Kittu [EMAIL PROTECTED] wrote:
 Right now we are using java based webservices and want to move them to
 ruby on rails webservice. I did not find any ActionWebservice package
 under gems folder.

 I appreciate if anyone can help me to find examples on SOAP based
 webservice with ruby.

 Ruby version: 1.8.7

 Thanks
   Krishna
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Which is the best attachment plugin for my situation?

2008-11-07 Thread blasterpal

I think paperclip is SOOO much easier to work with than attachment_fu.
But if things get more complicated attachment_fu is very good too.

H

On Nov 7, 11:32 am, Benjamin Curtis [EMAIL PROTECTED]
wrote:
 Either paperclip or attachment_fu will serve you well.
 --
 Benjamin Curtishttp://railskits.com/- Ready-made Rails 
 codehttp://catchthebest.com/- Team-powered 
 recruitinghttp://www.bencurtis.com/- Personal blog

 On Wed, Nov 5, 2008 at 1:23 PM, JL Smith [EMAIL PROTECTED] wrote:

  I'm trying to decide which attachment plugin best suites the needs for
  my project.  I have a model that I want to associate one or many
  attachments to.  The content-type of the attachment will vary as well
  (pdf, jpeg, doc, zip), not just an image type.  Thanks for any help!
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Job Post: RoR shop in Norcross area seeks talented SysAdmins

2008-11-06 Thread blasterpal

RECRUITERS/FIRMS DO NOT CONTACT ME. I AM NOT THE HIRING MANAGER NOR
WILL I BOTHER HER. I WILL IGNORE ALL 3RD PARTY EMAILS.

If any of you have colleagues or happen to be RoR focused sysadmin/
production related type, shoot me an email.

Thanks,
Hank
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Rails looking for development db in production

2008-10-02 Thread blasterpal

I've seen an issue before where non-root mysql accounts just don't
work. Even with full GRANT on the database in question. I can't
explain it. But for troubleshooting, try your root account in your
production database.yml and retry. Secondly, in the same manner,
database migrations sometimes give the same problem AFTER you get your
app working. Lastly, you can try to give the production connection the
path to your mysql.sock socket file. (find / -name mysql.sock) I've
seen that cause issues as well.



Good luck.
H

On Oct 2, 10:43 am, Schalk Neethling [EMAIL PROTECTED] wrote:
 Hi there everyone,

 On my production server I start the mongrel server as follows:

 mongrel_rails start -e production -a 127.0.0.1 -p 3001 -d

 However when going to the domain I get the following error:

 #42000Unknown database 'satechevents_development'

 Why is rails looking for the development database in production mode.

 Thanks for the help,
 Schalk
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: New to Rails.

2008-10-02 Thread blasterpal

10.5 changed some things. I've used this a couple of times already to
do from source (which is the most flexible and best for understanding
and learning):

http://hivelogic.com/articles/2007/11/installing-mysql-on-mac-os-x


H



On Oct 2, 10:14 am, Zack K. [EMAIL PROTECTED] wrote:
 I have locomotive on OS X 10.5 and i can't get mySQL to install right.
 That's my main problem.

 On Oct 2, 9:11 am, Shandy Nantz [EMAIL PROTECTED]
 wrote:

  Zack K. wrote:
   Can someone help me get started, i've been messing around with it
   lately, and i also learn some Ruby to understand RoR somemore. I've
   been trying to get it too work for awhile, but my problem is that i
   can NEVER get mySQL to install in anyway, shape, or form. It's really
   aggravating, so if anyone has anytips, that would be helpful!

   -Zack

  What are you trying to install? Instant Rails? Is there any kind of
  error that is being thrown?
  --
  Posted viahttp://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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: New to Rails.

2008-10-02 Thread blasterpal

The prefpane is broken in 10.5 last I check. For now just search for
mysql_safe and google how to start from command line. The real issue
here is OSX is not like Linux AT ALL in how it starts daemons. And
some of the reading you might find on Linux simply won't apply.

My real recommendation to people getting into Rails is you HAVE to
have some sysadmin comfort. Rails is NOT a a RAD in the sense of the
1990's (i'm showing my age :)). Don;t take this as a condemnation. I
am glad you are getting into Rails Zack. The primary issue with using
packages is that when they don't work or something about your system
is broken, you have no recourse.

I would recommend the following before you continue ANY further:

*download XCode 3 from Apple. and install
*run apple updates.
*ONLY use packages that say they work for 10.5. DO NOT assume 10.4
packages will work(they might). Apple has made some changes to 10.5
that I can't recall. But you are going to say yourself trouble if you
at least consider my warning.

Secondly,
If you are not ready to take the jump into downloading source. Then
investigate using Fink or DarwinPorts. I have found these invaluable
when I needed something running quickly (they do some of the compiling
work for you).

Good luck.
Hank

On Oct 2, 12:55 pm, Zack K. [EMAIL PROTECTED] wrote:
 I installed the .prefpane for System Preferences and it and always
 crashes when i try to start the server the prefpane crashes, any
 ideas?

 On Oct 2, 12:47 pm, Frederick Cheung [EMAIL PROTECTED]
 wrote:

  On 2 Oct 2008, at 17:27, blasterpal wrote:

   10.5 changed some things. I've used this a couple of times already to
   do from source (which is the most flexible and best for understanding
   and learning):

  http://hivelogic.com/articles/2007/11/installing-mysql-on-mac-os-x

  As far as mysql goes, I've never done anything fancier than  
  downloading the prebuilt packages from mysql

  Fred

   H

   On Oct 2, 10:14 am, Zack K. [EMAIL PROTECTED] wrote:
   I have locomotive on OS X 10.5 and i can't get mySQL to install  
   right.
   That's my main problem.

   On Oct 2, 9:11 am, Shandy Nantz [EMAIL PROTECTED]
   wrote:

   Zack K. wrote:
   Can someone help me get started, i've been messing around with it
   lately, and i also learn some Ruby to understand RoR somemore. I've
   been trying to get it too work for awhile, but my problem is that i
   can NEVER get mySQL to install in anyway, shape, or form. It's  
   really
   aggravating, so if anyone has anytips, that would be helpful!

   -Zack

   What are you trying to install? Instant Rails? Is there any kind of
   error that is being thrown?
   --
   Posted viahttp://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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Session lost with IE7 but not FF... 8 hours hit head/wall

2008-09-30 Thread blasterpal

I would take a step back and try running the test server in
production mode by simply changing the database.yml. This can get
the apples to apples comparison even closer and might yield different
results. Rails behaves a little different in my experience in each of
the modes.

Also look at your session storage mechanism if not file based.

H



On Sep 30, 7:38 am, Peter Alvin [EMAIL PROTECTED]
wrote:
 Our production site works great on IE7/FF but SAME code on test server
 fails for IE7...works great with FireFox.  We've spent 8 hours on this
 problem now about we're about to jump off bridge.

 I appears cookies are lost with IE7.  I've seen another post here but
 not a solution.

 Our development.log shows:

 Redirected tohttp://beta.mysite.com/login/login
 Filter chain halted as [:authorize] rendered_or_redirected.

 A Microsoft post says to set the domain for the session cookie.  Does
 anyone know how to do that for Rails?

 Any other feedback would be GREATLY appreciated.

 Pete
 --
 Posted viahttp://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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: ****[Rails] make a system call and proceed without waiting for result?

2008-09-27 Thread blasterpal

Even simpler. Use ruby 'fork' method. Example:

#show time now
puts Time.now
fork do
  #long running process
`sleep 20;curl -O www.somesite.com/bigfile.tgz`
end
#this time is nearly same as when we started, no delay
puts Time.now



On Sep 27, 4:59 pm, Craig White [EMAIL PROTECTED] wrote:
 On Sat, 2008-09-27 at 17:48 +0200, Max Williams wrote:
  This is probably a general ruby question:  in one of my models i need to
  make loads (up to 600 or so) of system calls with the curl command.
  It's a fire-and-forget kind of deal - i don't care, at that particular
  moment, whether the calls were successful or not and i certainly don't
  want to keep the user waiting for the html responses to come back.

  Is it possible, with a call to 'system' (or some other method) to carry
  on without waiting for the results?

 
 backgroundrb

 Craig
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: save blob to file?

2008-09-25 Thread blasterpal

The reason no error is thrown has nothing to do with Rails, but Ruby.
IO write is the actual method that is being called, correct?
See this: http://www.ruby-doc.org/core/classes/IO.html#M002296

According the the Ruby API is returns the number of bytes written. I
would suggest you add a check on your write method that the number of
bytes  0 and log an error.


H

On Sep 25, 9:23 am, Vicky Shaw [EMAIL PROTECTED]
wrote:
 Frederick Cheung wrote:
  On 24 Sep 2008, at 15:52, Vicky Shaw wrote:

  to
  change the mode to  'wb'

  I am using OpenSuse OS. I guess 'b' is needed on Windows OS to save it
  as a binary file.
  Problem: I don't see any such file on my filesystem.

  more likely that you don't have write access or you're ending up
  building a duff path. Inspect the exact path you're trying to use and
  check permissions and so on.

 Thank you for the help Fred.

 The permissions were wrong. One more question: why is this error not
 logged in the rails log file?

 -
 Shantanu.



  Fred

 --
 Posted viahttp://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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: extract a substring

2008-09-21 Thread blasterpal

my_string=blablablablacoordinatessubstring/coordinatesblabla
#the parentheses below define the actual match for the overall regex
pattern
sub_string = /.*coordinates(.*)\/coordinates.*/.match(my_string)
puts sub_string[0]

Regex is the fastest/most effective for one/off text parsing. Another
good option is Whytheluckystiff's Hpricot:
http://code.whytheluckystiff.net/hpricot/

Hank
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Problem with attachment_fu and ImageScience

2008-09-21 Thread blasterpal

Victor,

I have found production/test deployment oddities can be resolved by
switching your local development into production mode to force
Rails to behave like it would on your server.

The quickest way to do this is to edit your database.yml and copy your
development: block and rename to production:. Then change the name
of the original production: block to something else like
production_off:. Restart your local development server but add the -
e production or just production argument and you might find the
same behavior. Now have eliminated your server as the culprit of the
issue. For example, it could be a problem in the way you are using
attachment_fu. Development mode and production mode are not 100%
congruous in my experience.

secondly, make sure you are not using reserved column names in your
tables. This looks suspicious in that regard:

...The single-table inheritance mechanism
failed to locate the subclass: 'NULL'

A good example is a type column. This is reserved for polymorphism
and can introduce some unwanted automagically ActiveRecord behavior.


Hank
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Downtown Atlanta - RoR Zealot - looking for peers to chat over beers

2008-09-19 Thread blasterpal

I live in downtown area. And I realize the Atlanta RUG has meetings,
but I can't always make them on Wed. evening if I have kid duty.
Secondly, they are a little more formal that I was thinking. I'm
looking to informally network and connect with any folks who live in
town.

I love Rails and want to find similar individuals. If you are
interested connect back to me and maybe we'll have Ruby on Beers
night?

Hank
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Ruby developer Position @ Midtown , Atlanta

2008-09-19 Thread blasterpal

It's a legitimate job opening, but I think the posting looks as if it
were posted in 30 seconds to 'beat' the other headhunters who learned
of it that same day. It is annoying. And its not midtown. Its
norcross, jeez.


H
On Sep 19, 6:30 am, Pratik [EMAIL PROTECTED] wrote:
 Ah. nice catch Fred

 On Fri, Sep 19, 2008 at 11:06 AM, Frederick Cheung



 [EMAIL PROTECTED] wrote:

  On Sep 19, 1:11 am, Pratik [EMAIL PROTECTED] wrote:
  I'm curious to know how that spam mail got into my inbox 
  -http://skitch.com/lifofifo/smma/google-mail-rails-ruby-developer-posi...

  I saw that too. the mail looks like it when through the list but by
  filter (which was that the To field is [EMAIL PROTECTED] got
  confused.

  Fred

  On Fri, Sep 19, 2008 at 1:07 AM, Rodrigo Fuentealba

  [EMAIL PROTECTED] wrote:

   2008/9/18 Ryan Bigg [EMAIL PROTECTED]:

   Why send this from a @gmail.com address?

   Probably he is at home, and has this address registered to the mailing
   list. I know it may be spam, but let's give the benefit of doubt for
   this time.

   --
   Rodrigo Fuentealba
  http://www.thecodekeeper.net/

  --
  Cheers!
  - Pratikhttp://m.onkey.org

 --
 Cheers!
 - Pratikhttp://m.onkey.org
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: 0% experience

2008-09-18 Thread blasterpal

Back in 2006 when Rails was just getting noticed, I learned using that
same book First edition. Good choice. What other languages/frameworks
do you have experience with? I find that can help in telling people
how to approach Rails. Also are you a Mac or PC guy? This helps too.


H
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: change_table is not working on production server

2008-09-18 Thread blasterpal

To debug this I would:

1) verify schema versions match on dev compared to prod: select *
from schema_migrations;
2) turn up debug on prod logging: in evironment.rb uncomment this
line: # config.log_level = :debug and tail -f log/* when running
migrations. see if it is even doing what you think it is doing.
3) I've found in Rails 2 this statement causes issues when I migrate
on non-development environments. And I sometimes comment it before I
do migrations:
environments/production.rb : config.cache_classes = true

I hope this helps.
H

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---