Re: [Rails] Re: Strange error while using Authlogic

2010-11-29 Thread Konstantinos Loupos
Hi colin,
as i have seen, authlogic does require default names like login, password
etc. I was using t_login and t_password as i result getting these errors.
I re-created my table with the new fields and everything works fine!!!

Home that helps someone else getting the same errors!!!

Thank you for your help!
Kostas
Κωνσταντίνος Λούπος
loup...@gmail.com


On Sat, Nov 27, 2010 at 2:36 PM, Colin Law  wrote:

> On 27 November 2010 12:21, Kostas L.  wrote:
>
> Please don't top post, it makes it difficult to follow the thread.
> Insert your reply into the previous post.  Thanks
>
> > Hi colin,
> > i have used these names because i have already created a php
> > application using these names and i want to create the same
> > application in rails.
> > Its for a project in my university.
> > I dont want to have different field names ..
> > Do you think the problem is the names??? I dont think so...
>
> Well the error message is NoMethodError, Model UserSession does not
> respond to t_login which is saying the UserSession does not have a
> method t_login, which suggests to me that the name is the problem.
> Have you done something somewhere else in your code to tell Authlogic
> to expect the different names?
>
> It is easy enough to see if this is the problem here, just change
> those few lines of code and see if that error goes away.
>
> Colin
>
> --
> 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-t...@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.
>
>

-- 
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-t...@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] rails 3 meta_search usage

2010-11-29 Thread tispratik
I am in the process of upgrading my app from Rails2 to Rails3.
My Rails2 app uses searchlogic heavily.
After googling i've come to know that searchlogic is not compatible
with Rails3 and need to use meta_search instead.

But i havent quite understood the usage of meta_search vis-a-vis
searchlogic.

If i have a User model with :name and :address fields, i am not able
to use the following methods with meta_search. What am i doing wrong?

ruby-1.9.2-p0 > User.name_null
NoMethodError: undefined method `name_null' for #
from /home/pratik/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.3/lib/
active_record/base.rb:1008:in `method_missing'
from (irb):7
from /home/pratik/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.3/lib/
rails/commands/console.rb:44:in `start'
from /home/pratik/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.3/lib/
rails/commands/console.rb:8:in `start'
from /home/pratik/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.3/lib/
rails/commands.rb:23:in `'
from script/rails:6:in `require'
from script/rails:6:in `'

None of the methods like User.user_id_eq(1) or
User.name_equals("Blah") are working. I guess i havent understood the
usage of meta_search yet!

Ref:
meta_search https://github.com/ernie/meta_search

-- 
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-t...@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] software and hardware specifications for ror website

2010-11-29 Thread satya
Dear all,
pls dont mind for asking this...will somebody tell me the software and
hardware requirements of server and client for my rails
application(website)
well.. i am using ruby 1.9.2 and rails 3.0.3 and gem 1.3.7 and
mysql5..for my site development on my windows7...

-- 
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-t...@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] simple SQLITE3 error!!??library routine called out of sequence

2010-11-29 Thread Tianshuo Deng
Hi, dear guys!
I have following super simple program
dbh=DBI.connect("DBI:SQLite3:barron.db")
sth=dbh.prepare("INSERT INTO WORDS VALUES(?,?,?)")

3.times{
sth.execute("1","2","3")
}

and it gives me error :
/Users/tsdeng/.rvm/gems/ruby-1.8.7-p302/gems/sqlite3-ruby-1.3.1/lib/sqlite3/statement.rb:41:in
 `bind_param': library routine called out of sequence (SQLite3::MisuseException)
from 
/Users/tsdeng/.rvm/gems/ruby-1.8.7-p302/gems/sqlite3-ruby-1.3.1/lib/sqlite3/statement.rb:41:in
 `bind_params'
from 
/Users/tsdeng/.rvm/gems/ruby-1.8.7-p302/gems/sqlite3-ruby-1.3.1/lib/sqlite3/statement.rb:37:in
 `each'
from 
/Users/tsdeng/.rvm/gems/ruby-1.8.7-p302/gems/sqlite3-ruby-1.3.1/lib/sqlite3/statement.rb:37:in
 `bind_params'
from 
/Users/tsdeng/.rvm/gems/ruby-1.8.7-p302/gems/dbd-sqlite3-1.2.5/lib/dbd/sqlite3/statement.rb:71:in
 `bind_params'
from 
/Users/tsdeng/.rvm/gems/ruby-1.8.7-p302/gems/dbi-0.4.5/lib/dbi/handles/statement.rb:115:in
 `execute'
from words.rb:53
from words.rb:49:in `each'
from words.rb:49




I can avoid this error by not using prepared statement. But I want to use it!!! 
 T_T



-- 
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-t...@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.



Re: [Rails] Re: Installing a gem in an application

2010-11-29 Thread rajeevsharma86
"gem install haml"

On Tue, Nov 30, 2010 at 9:54 AM, Ralph Shnelvar wrote:

> Ok ... a long search on Google found something called
>  gem unpack
>
> Sadly, I am clueless how to use it ... what my current directory should
> be ... and how to point to it once I do the unpack.
>
> --
> 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-t...@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.
>
>


-- 
Thanks:
Rajeev sharma
+919013155133

-- 
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-t...@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: referring to params in other controller

2010-11-29 Thread Paul Roche
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-t...@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: Installing a gem in an application

2010-11-29 Thread Ralph Shnelvar
Ok ... a long search on Google found something called
  gem unpack

Sadly, I am clueless how to use it ... what my current directory should
be ... and how to point to it once I do the unpack.

-- 
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-t...@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.



Re: [Rails] Re: referring to params in other controller

2010-11-29 Thread rajeevsharma86
basically you got two possibilities:
1. write the value into a session-variable
  session[:object] = "some string or value"

2. pass your value as a parameter to some action and read params in
your controller:
view:
  <%=  link_to "my_action" :controller => :bla, :action
=> :my_action, :object => "some string or value" %>


controller:
  def my_action
puts params[:wtf]
  end



On Tue, Nov 30, 2010 at 9:46 AM, Paul Roche  wrote:

> Sure. I have a page in (view\controller x) with an input field.
> Submitting the form displays the value of the input field on this same
> page.
>
> There is a link on this page that connects to another page in a
> different view/controller (view\controller y). I want to use the param
> (input field value) as a conditon in a 'find' in the controller y. But I
> am not yielding results. It's like the param is empty. I hope this makes
> it a little clearer
>
> --
> 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-t...@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.
>
>


-- 
Thanks:
Rajeev sharma
+919013155133

-- 
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-t...@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: referring to params in other controller

2010-11-29 Thread Paul Roche
Sure. I have a page in (view\controller x) with an input field. 
Submitting the form displays the value of the input field on this same 
page.

There is a link on this page that connects to another page in a 
different view/controller (view\controller y). I want to use the param 
(input field value) as a conditon in a 'find' in the controller y. But I 
am not yielding results. It's like the param is empty. I hope this makes 
it a little clearer

-- 
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-t...@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.



Re: [Rails] Re: referring to params in other controller

2010-11-29 Thread rajeevsharma86
rom a page in another
controller?

means
On Tue, Nov 30, 2010 at 9:36 AM, Marnen Laibow-Koser
wrote:

> Paul Roche wrote in post #964999:
> > Hi. Is it possible to refer to a parameter from a page in another
> > controller?
>
> Your question is unclear as stated.  More details?
>
> Best,
> --
> Marnen Laibow-Koser
> http://www.marnen.org
> mar...@marnen.org
>
> Sent from my iPhone
>
> --
> 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-t...@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.
>
>


-- 
Thanks:
Rajeev sharma
+919013155133

-- 
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-t...@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: referring to params in other controller

2010-11-29 Thread Marnen Laibow-Koser
Paul Roche wrote in post #964999:
> Hi. Is it possible to refer to a parameter from a page in another
> controller?

Your question is unclear as stated.  More details?

Best,
-- 
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

Sent from my iPhone

-- 
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-t...@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] referring to params in other controller

2010-11-29 Thread Paul Roche
Hi. Is it possible to refer to a parameter from a page in another
controller?

-- 
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-t...@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: invalid date

2010-11-29 Thread Jesus Granados
Humberto Ribeiro wrote in post #964474:
> maybe you in windows right?
> it was happening with me on windows ... so i loaded an linux
> virtualbox and all works fine...
> till now i didnt found any solution to make it works in windows...
> if you find please tellme

It didn´t work...We also tried updating Ruby to 1.8.7 also not 
working...

-- 
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-t...@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: editors available for designing for ror..

2010-11-29 Thread jus...@zeusedit.com
On Nov 27, 12:49 am, Andre Joseph Cubeta  wrote:

> if windows nah' I'm not a fan of any editors sorry for that, or just
> a simple TextPad will do.

Or use more of a programmer specific editor like Zeus for Windows:

  http://www.zeusedit.com

Jussi Jumppanen
Author: Zeus for Windows

-- 
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-t...@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] Installing a gem in an application

2010-11-29 Thread Ralph Shnelvar
When I attempt to launch my application on my server, the Mongrel log
says that

Missing these required gems:
  haml

I do not control my server and the ISP has told me that he will give me
no support in terms of Ruby on Rails.

Is there a way to install the gem in my application and/or place the gem
in some directory that will allow haml to be found?

-- 
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-t...@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: Re: wkhtmltopdf and PDFkit

2010-11-29 Thread Nick Burdick
Conor Nugent wrote in post #963078:
> Hi David,
>
> I'm really glad the post helped! Thank you for all your advise too!

David, Conor,

I tried to install via the method mentioned by Conor above and when I
generate a PDF, it comes up blank.  I also try running from the command
line and I also get a blank PDF.  It's really strange, when I installed
the first time (into the default location) and I ran from command line,
I got it to work with "wkhtmltopdf www.google.com goof.pdf" but it
hasn't worked since.  I have a new MacBook, running rvm with ruby 1.8.7
and rails 3.

Any thoughts you have would be greatly appreciated.  I'm wondering if I
somehow need to do a complete delete after the various attempts at
installation, but I don't see anything else to delete aside from the
wkhtmltopdf file in use/local/bin or the rvm directory.  Have either of
you had to install the 64 bit version?

Thanks,
Nick

-- 
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-t...@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: Error creating model object using accepts_nested_attributes_for

2010-11-29 Thread Sj Tib
Looking for any pointer to help address or some way to debug this 
problem. Appreciate any thoughts.

Thanks,
-S

-- 
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-t...@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.



Re: [Rails] checkbox array

2010-11-29 Thread Philip Hallstrom

On Nov 29, 2010, at 5:07 PM, Luk Mus wrote:

> Can't get array. The controller gets only 1 parametr.
> 
> Form in view:
> 
>>> 
>>><% Categor.all.each do |cat| %>
>>>   <%= check_box_tag(:prodcat,cat.id) %>
>>>   <%= label_tag(:prodcat, cat.title) %>
>>><% end %>
>>> 
> 
> Controller:
> 
>>> params[:prodcat].each do |cat|
>>>   @pc=Prodcat.new(@product.id,cat)
>>>   @pc.save
>>> end
> 
> How i can get array?

In view...

<%= check_box_tag('prodcat[]', cat.id) %>

Would be one way...

-philip

> 
> -- 
> 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-t...@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.
> 

-- 
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-t...@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: rvm and gem confusion

2010-11-29 Thread tundrax
Maybe your RVM is not running as a function that is causing gem env
confusion.
Check out the manual, Post Install section.

Run "type rvm | head -n1" and check if the return is "rvm is a
function". And if it's not, follow the instructions given in the
manual.
Hope this helps.

On Nov 30, 9:11 am, Marnen Laibow-Koser  wrote:
> Paul Bergstrom wrote in post #964948:
>
> > You're really a funny guy Marnen. I thought Rails was based on Ruby. :-)
>
> Of course it is.  This list, however, is not for basic Ruby or RVM
> questions, but only for issues specific to Rails.  So your question is
> off topic here.  Please take it where it is on topic -- that way it will
> get seen by more people who can help.
>
>
>
> > I'm trying to install Rails 3. Besides this hopeless linear behavior
> > from Marnen, anyone who can assist me with an answer? Or should I ask in
> > the Ruby list instead and say that I'm trying to install Rails using rvm
> > and gem but be asked to jump over to Rails list instead as I happen to
> > mention Rails?
>
> Your problem is with RVM, not with Ruby or Rails.
>
> Best,
> -- 
> Marnen Laibow-Koserhttp://www.marnen.org
> mar...@marnen.org
>
> Sent from my iPhone
>
> --
> 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-t...@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] checkbox array

2010-11-29 Thread Luk Mus
Can't get array. The controller gets only 1 parametr.

Form in view:

>> 
>> <% Categor.all.each do |cat| %>
>><%= check_box_tag(:prodcat,cat.id) %>
>><%= label_tag(:prodcat, cat.title) %>
>> <% end %>
>> 

Controller:

>> params[:prodcat].each do |cat|
>>@pc=Prodcat.new(@product.id,cat)
>>@pc.save
>> end

How i can get array?

-- 
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-t...@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: error: mail requires i18n (~> 0.4.1, runtime)

2010-11-29 Thread Sarah Dunne
Thanks! Hassan for your reply/ help!

I have deleted that version of gem now.

-- 
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-t...@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] Rails 3 & FasterCSV

2010-11-29 Thread Jeremy Woertink
I'm using FasterCSV to upload some csv files and create some records
based off the data in the CSV files. I'm pretty sure the problem is a
character encoding issue because the CSV is full of French and German
words. If I remove all the accents off the letters, then it uploads
fine, otherwise it just throws a FasterCSV::MalformedCSVError.


jeremy-woertinks-imac:winovations jeremywoertink$ file -I
~/Downloads/example.csv
/Users/jeremywoertink/Downloads/example.csv: text/plain;
charset=iso-8859-1

I'm using
jeremy-woertinks-imac:winovations jeremywoertink$ ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin9.8.0]
gem 'rails', '3.0.1'
gem 'fastercsv', '1.5.3'

Is there a way to set the default encoding for FasterCSV? I looked
through the docs and didn't see it, and most my google searches turned
up people wanting the encoding to be UTF-8, but I don't think that's
what I should be using.

Any ideas?

Thanks,
~Jeremy

-- 
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-t...@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.



Re: [Rails] Re: error: mail requires i18n (~> 0.4.1, runtime)

2010-11-29 Thread Hassan Schroeder
On Mon, Nov 29, 2010 at 4:04 PM, Sarah Dunne  wrote:
> ...Anyone?

What was the problem with the instructions you quoted?

> gem uninstall i18n
>
> Select gem to uninstall
> 1. i18n-0.4.2
> 2. i18n-0.5.0
> 3. All versions
>
> select 2

Pressing the '2' button on your keyboard didn't work, or ___?

Alternatively, if you want to remove a specific gem, you can always
use e.g.
   gem uninstall  i18n  -v 0.5.0

HTH,
-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

-- 
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-t...@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: rvm and gem confusion

2010-11-29 Thread Marnen Laibow-Koser
Paul Bergstrom wrote in post #964948:
> You're really a funny guy Marnen. I thought Rails was based on Ruby. :-)

Of course it is.  This list, however, is not for basic Ruby or RVM 
questions, but only for issues specific to Rails.  So your question is 
off topic here.  Please take it where it is on topic -- that way it will 
get seen by more people who can help.

>
> I'm trying to install Rails 3. Besides this hopeless linear behavior
> from Marnen, anyone who can assist me with an answer? Or should I ask in
> the Ruby list instead and say that I'm trying to install Rails using rvm
> and gem but be asked to jump over to Rails list instead as I happen to
> mention Rails?

Your problem is with RVM, not with Ruby or Rails.

Best,
-- 
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

Sent from my iPhone

-- 
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-t...@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: error: mail requires i18n (~> 0.4.1, runtime)

2010-11-29 Thread Sarah Dunne
...Anyone?

-- 
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-t...@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: rvm and gem confusion

2010-11-29 Thread Paul Bergstrom
You're really a funny guy Marnen. I thought Rails was based on Ruby. :-)

I'm trying to install Rails 3. Besides this hopeless linear behavior 
from Marnen, anyone who can assist me with an answer? Or should I ask in 
the Ruby list instead and say that I'm trying to install Rails using rvm 
and gem but be asked to jump over to Rails list instead as I happen to 
mention Rails?

-- 
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-t...@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: Rails 3 rspec 2 rendering XML repsonse.should contain(.to_xml)

2010-11-29 Thread David Chelimsky


On Nov 29, 2:58 pm, GregD  wrote:
> Hi all,
>
> Is there an issue with Rails 3 or rspec 2 that the
> repond_with({"success" => "test") where the response is not an xml
> text?
>
> I have almost converted an old Rails 2 app to Rails 3 and having an
> issue with the rspec tests and the response content for xml.  It works
> for json, but not xml.
>
> Say I have something like this.
>
> SimpleController < ActionController::Base
>
>   respond_to :html, :xml, :json
>
>   def test_action
>     �...@foo = { "success" => "test" }
>      respond_with(@foo) do |format|
>        format.html { render :text => "success"}
>     end
>   end
> end
>
> When I tested the xml rendering, I check the response contains
> (have_text in rails 2) for the content.  In the past (rails 2 and
> rspec 1.x), I would test this as:
> response.should have_text("
> \n\n  test\n\n")
>
> I converted the 'have_text' to 'contain' to read:
> response.should contain("
> \n\n  test\n\n")

The contain matcher comes from either webrat or capybara, and is
designed to specify content that is visible in a browser in an HTML
page (i.e. not tags).

I'd go with have_xpath instead, which is supported by both webrat and
capybara, though with slightly different APIs for each (check their
docs).

HTH,
David

>
> This spec fails with on xml and not json:
>
>      Failure/Error: response.should contain(success_text)
>      expected the following element's content to include " version="1.0" encoding="UTF-8"?>
>      
>        xml
>      
>      ":
>      test
>
> It looks like, the response is only "test" which is the value of the
> hash.
>
> On json the response is as expected:  {"success":"test"}.
>
> Sorry for the lame example, but I really did not want to go into big
> long explanation of the "real" test code.  Basically, I test the
> response and it should contain valid xml or json based on the format.
> I even tried response.body and it fails.  Is this a rspec issue?  I
> did a pp of the response and the body does look like the expected
> result.
>
> Has anyone come across this?
>
> Thanks,
>
> GregD

-- 
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-t...@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: can't activate i18n (~> 0.4.1, runtime) for ["mail-2.2.10"

2010-11-29 Thread Vishal Kajjam
I am a newbie to ruby on rails. Even I faced the same issue as I was 
following the book "agile development with rails, 3rd edition." Any 
suggestions?

Thanks
vishal

-- 
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-t...@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] rake aborted! getaddrinfo: Name or service not known

2010-11-29 Thread Franck Fallateuf
I'm deploying new rails applications.  Everything works well
except when it comes to the db migration:

* executing "cd /var/rails/benefits_test/releases/20101129190121 &&
/opt/ruby-enterprise-1.8.7-2010.02/bin/rake RAILS_ENV=production
db:util:migrate"
servers: ["ps-test-app1"]
[ps-test-app1] executing command
** [out :: ps-test-app1] (in
/filestore/rails/benefits_test/releases/20101129190121)
*** [err :: ps-test-app1] rake aborted!
*** [err :: ps-test-app1] getaddrinfo: Name or service not known
*** [err :: ps-test-app1]
*** [err :: ps-test-app1] (See full trace by running task with --trace)
command finished
failed: "sh -c 'cd /var/rails/benefits_test/releases/20101129190121 &&
/opt/ruby-enterprise-1.8.7-2010.02/bin/rake RAILS_ENV=production
db:util:migrate'" on ps-test-app1


When I manually run it with '--trace' I see nothing evident:
[r...@ps-test-app1 current]# rake RAILS_ENV=production db:migrate
--trace
(in /filestore/rails/benefits_test/releases/20101129190121)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
getaddrinfo: Name or service not known
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/drb/drb.rb:861:in
`initialize'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/drb/drb.rb:861:in `open'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/drb/drb.rb:861:in
`open_server'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/drb/drb.rb:759:in
`open_server'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/drb/drb.rb:757:in `each'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/drb/drb.rb:757:in
`open_server'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/drb/drb.rb:1342:in
`initialize'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/drb/drb.rb:1630:in `new'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/drb/drb.rb:1630:in
`start_service'
/filestore/rails/benefits_test/releases/20101129190121/vendor/plugins/backgroundrb/lib/backgroundrb.rb:11
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in
`require'
/filestore/rails/benefits_test/releases/20101129190121/vendor/plugins/backgroundrb/init.rb:1:in
`evaluate_init_rb'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:158:in
`evaluate_init_rb'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/kernel/reporting.rb:11:in
`silence_warnings'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:154:in
`evaluate_init_rb'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:48:in
`load'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:38:in
`load_plugins'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:37:in
`each'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:37:in
`load_plugins'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:369:in
`load_plugins'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:165:in
`process'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in
`send'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in
`run'
/filestore/rails/benefits_test/releases/20101129190121/config/environment.rb:23
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
`require'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in
`new_constants_in'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
`require'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/misc.rake:4
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
`call'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
`execute'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
`each'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
`execute'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
`invoke_with_call_chain'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/monitor.rb:242:

[Rails] Re: Error installing rails 3, get error: mail requires i18n (~> 0.4.1, runtime)

2010-11-29 Thread Sarah Dunne
Andy,

I have the same problem, trouble is i have never ever used command 
prompt in my life ,and am wondering how do i select option two to 
uninstall?

-- 
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-t...@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] Fresh podcasts

2010-11-29 Thread Vladimir Rybas
Hey dudes,

Does anybody know where to find a fresh Ruby/Rails podcasts? Which
ones do you listen to?
Looks like http://podcast.rubyonrails.org/ is not updated very often.
By the way, which other Software Development podcasts can you
recommend?

I'm giving my iPod shuffle a second life. I'm kinda not listening a
music that often now. But long subway trips ain't going anywhere )) So
I want to spend this time at least with some profit.

-- 
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-t...@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: error: mail requires i18n (~> 0.4.1, runtime)

2010-11-29 Thread Sarah Dunne
When i uses this prompt "Gem uninstall i18n-0.5.0"


it renders this

"cannot uninstall, check gem list-diln8-0.5.0"

-- 
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-t...@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: Error installing rails 3, get error: mail requires i18n (~> 0.4.1, runtime)

2010-11-29 Thread Andy
*I also uninstalled i18n 0.5.0 leaving i18n 0.4.2 to get everything
working...

Andy

-- 
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-t...@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: error: mail requires i18n (~> 0.4.1, runtime)

2010-11-29 Thread Sarah Dunne
Does anyone know gow i can uninstall the second gem using command 
prompt>?

I have tried 18 differnt prompts lol!

-- 
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-t...@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: Help needed!

2010-11-29 Thread Marnen Laibow-Koser
Please quote when replying.

thunda wrote in post #964927:
> Yes, sorry, makes me look like a complete novice
>
> I understand about all instructions on every page on the link, but I
> tried, but got to the adding database, and didnt understand where I
> would start that.

By following the instructions -- which have the exact commands to type! 
What did you try?  What didn't work?  What error messages did you get?

>
> I know how to add to mysql, but I didnt want to screw up my cpanel or
> server with going any further.

If you have a dedicated box you can play with, things will probably be 
easier for the moment.
>
> Once again my apologies for lack of info in the header... Lesson
> learnt.
>
> regards
>
> Thunda

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

-- 
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-t...@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: Help needed!

2010-11-29 Thread thunda
Yes, sorry, makes me look like a complete novice

I understand about all instructions on every page on the link, but I
tried, but got to the adding database, and didnt understand where I
would start that.

I know how to add to mysql, but I didnt want to screw up my cpanel or
server with going any further.

Once again my apologies for lack of info in the header... Lesson
learnt.

regards

Thunda


On Nov 29, 10:38 pm, Marnen Laibow-Koser  wrote:
> Please use a more descriptive subject line in future.
>
> thunda wrote in post #964912:
>
> > I am a complete novice when it comes to ruby and gems/rails.  I was
> > wondering where I would go to get help installing this on my domain,
> > so I can test it.
>
> >http://github.com/maccman/holla
>
> Installation instructions are on that very page you linked to.  Follow
> them.
>
>
>
> > paid or unpaid help sought?!
>
> > Regards
>
> > Thunda
>
> Best,
> --
> Marnen Laibow-Koserhttp://www.marnen.org
> mar...@marnen.org
>
> --
> 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-t...@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: Re: Re: Email marketing services

2010-11-29 Thread Marnen Laibow-Koser
Please quote when replying.

Peter Bell wrote in post #964908:
> I'd qualify this. I have a number of clients who send out a modest
> number of confirmation emails and yet have managed to get blacklisted by
> various ISPs over the years.
>
> It is factually correct that sending too many emails is not the issue.
> it's more to do with the content of the email, the sending patterns, the
> number of similar emails sent in a given time period to different users,
> how many users mark the messages as spam (even if they aren't).

Exactly.

> That
> said, I have found that there are definite deliverability issues with
> sending out even things like order confirmation emails and I love to
> offload the deliverability issues on business that specialize in
> deliverability.

That may be desirable.

>
> Best Wishes,
> Peter

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

-- 
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-t...@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: Help needed!

2010-11-29 Thread Marnen Laibow-Koser
Please use a more descriptive subject line in future.

thunda wrote in post #964912:
> I am a complete novice when it comes to ruby and gems/rails.  I was
> wondering where I would go to get help installing this on my domain,
> so I can test it.
>
> http://github.com/maccman/holla

Installation instructions are on that very page you linked to.  Follow 
them.

>
> paid or unpaid help sought?!
>
> Regards
>
> Thunda

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

-- 
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-t...@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: error: mail requires i18n (~> 0.4.1, runtime)

2010-11-29 Thread Bdhdhdhhhdh Zstgsyhwyhdyh
I found a previous answer to this question below. I havwe never used 
command prompt before :embarrassed:

What do i "select 2"should i not uninstall the first one as that 
seems to be an older version ?




Do this:

Gem uninstall i18n

Select gem to uninstall
1. i18n-0.4.2
2. i18n-0.5.0
3. All versions

select 2

then install rails
gem install rails --force

this should work

Henrik

-- 
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-t...@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: rvm and gem confusion

2010-11-29 Thread Marnen Laibow-Koser
Paul Bergstrom wrote in post #964914:
> I've previously used Macports to manage ruby. Now I've installed rvm and
> installed ruby 1.9.2. Seems to be ok. But I'm a bit confused of where
> the gems are. So 2 questions:
>
> 1) I have my gems in .gem. This is the "old" location. With rvm they
> should be in .rvm. I've created a gemset global. Will this then be
> available for all apps on the server?
>
> 2) When trying to install mail with "gem install mail" I get "ERROR:
> While executing gem ... (Errno::EACCES) Permission denied -
> /Users/me/.gem/specs". Why (besides the permission issue)? Is it still
> trying to install in .gem?

This is probably better asked on the Ruby or RVM list.  It certainly has 
nothing to do with Rails.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

-- 
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-t...@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] HTML5 placeholder attribute and i18n proposal

2010-11-29 Thread Paul Schreiber
This was filed as:

…and Aditya Sanghi suggsted I post to the list about it

Currently, Rails' I18n system automatically looks up localized text for  
tags. It would be nice if it did something similar for the HTML5 placeholder 
attribute.

Your en.yml file would like this:

helpers:
 placeholder:
  person:
   first_name: "John"
   last_name: "Doe"

Your ERB would look the same:
<%= f.text_field :first_name %>

Your HTML would look like this:


Currently, you have to clutter up your markup like so:
<%= f.text_field :first_name, :placeholder => 
t('helpers.placeholder.person.first_name') %>





Paul

-- 
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-t...@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] rvm and gem confusion

2010-11-29 Thread Paul Bergstrom
I've previously used Macports to manage ruby. Now I've installed rvm and
installed ruby 1.9.2. Seems to be ok. But I'm a bit confused of where
the gems are. So 2 questions:

1) I have my gems in .gem. This is the "old" location. With rvm they
should be in .rvm. I've created a gemset global. Will this then be
available for all apps on the server?

2) When trying to install mail with "gem install mail" I get "ERROR:
While executing gem ... (Errno::EACCES) Permission denied -
/Users/me/.gem/specs". Why (besides the permission issue)? Is it still
trying to install in .gem?

-- 
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-t...@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] error: mail requires i18n (~> 0.4.1, runtime)

2010-11-29 Thread Bdhdhdhhhdh Zstgsyhwyhdyh
Hi

Have spent hours trying to set up ruby and rails in order to do a
project for college , have uninstalled /installed etc ...this error
...what does it mean?    Is their a simple way to rectify this
infuriating mes
sage

I am using windows 7

Thanks in advance

Sarah

-- 
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-t...@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] Help needed!!!

2010-11-29 Thread thunda
I am a complete novice when it comes to ruby and gems/rails.  I was
wondering where I would go to get help installing this on my domain,
so I can test it.

http://github.com/maccman/holla

paid or unpaid help sought?!

Regards

Thunda

-- 
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-t...@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: Error installing rails 3, get error: mail requires i18n (~> 0.4.1, runtime)

2010-11-29 Thread Andy
Same just happened to me on Ubuntu 10.04 using RVM.

Anyways, my theory at the moment is they just released i18n 0.5.0 and
gem install rails installed 0.5.0 and mail gem requires i18n version
0.4.x.


Here's the entire painful process of getting it working.

abarrin...@andys-dev-box:~$ gem install rails
ERROR:  Error installing rails:
mail requires i18n (~> 0.4.1, runtime)
abarrin...@andys-dev-box:~$ gem install i18n
Successfully installed i18n-0.5.0
1 gem installed
Installing ri documentation for i18n-0.5.0...
Installing RDoc documentation for i18n-0.5.0...
abarrin...@andys-dev-box:~$ gem install rails
ERROR:  Error installing rails:
mail requires i18n (~> 0.4.1, runtime)
abarrin...@andys-dev-box:~$ gem list

*** LOCAL GEMS ***

abstract (1.0.0)
actionpack (3.0.3)
activemodel (3.0.3)
activerecord (3.0.3)
activeresource (3.0.3)
activesupport (3.0.3)
arel (2.0.4)
builder (2.1.2)
erubis (2.6.6)
i18n (0.5.0)
mime-types (1.16)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
rack-test (0.5.6)
rake (0.8.7)
treetop (1.4.9)
tzinfo (0.3.23)
abarrin...@andys-dev-box:~$ gem install mail
Successfully installed i18n-0.4.2
Successfully installed mail-2.2.10
2 gems installed
Installing ri documentation for i18n-0.4.2...
Installing ri documentation for mail-2.2.10...
Installing RDoc documentation for i18n-0.4.2...
Installing RDoc documentation for mail-2.2.10...
abarrin...@andys-dev-box:~$ gem install rails -v 3.0.3
Successfully installed actionmailer-3.0.3
Successfully installed thor-0.14.6
Successfully installed railties-3.0.3
Successfully installed bundler-1.0.7
Successfully installed rails-3.0.3
5 gems installed
Installing ri documentation for actionmailer-3.0.3...
Installing ri documentation for thor-0.14.6...
Installing ri documentation for railties-3.0.3...
Installing ri documentation for bundler-1.0.7...
Installing ri documentation for rails-3.0.3...
Installing RDoc documentation for actionmailer-3.0.3...
Installing RDoc documentation for thor-0.14.6...
Installing RDoc documentation for railties-3.0.3...
Installing RDoc documentation for bundler-1.0.7...
Installing RDoc documentation for rails-3.0.3...


abarrin...@andys-dev-box:~$ gem list

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.3)
actionpack (3.0.3)
activemodel (3.0.3)
activerecord (3.0.3)
activeresource (3.0.3)
activesupport (3.0.3)
arel (2.0.4)
builder (2.1.2)
bundler (1.0.7)
erubis (2.6.6)
i18n (0.5.0, 0.4.2)
mail (2.2.10)
mime-types (1.16)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
rack-test (0.5.6)
rails (3.0.3)
railties (3.0.3)
rake (0.8.7)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.23)




On Nov 29, 11:54 am, Mike Moretti  wrote:
> Hi folks:
>
> I have Windows XP Pro SP3. I have installed ruby 1.9.2p0   (2010-08-18
> [i386-mingw32]). I’m trying to install rails 3 by entering  “gem install
> rails” on command prompt window (i.e. DOS window). Halfway through
> installation I get the following:
>
> ERROR: Error installing rails:
>        mail requires i18n (~> 0.4.1, runtime)
>
> Can anyone help please?
>
> Mike
>
> --
> 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-t...@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: Re: Email marketing services

2010-11-29 Thread Greg Ma
Marnen Laibow-Koser wrote in post #964906:
>
> You are indeed wrong.
>

Then I am really happy to be wrong :)
Thank you

-- 
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-t...@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: Re: Email marketing services

2010-11-29 Thread Marnen Laibow-Koser
Greg Ma wrote in post #964904:
> Peter De Berdt wrote in post #964797:
>
>> If you just want to send out confirmation mails, what's wrong with
>> using the local mailserver?
>
> I might be wrong but if we send too many emails from our server aren't
> we getting black listed by gmail, hotmail, yahoo and so on?

You are indeed wrong.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

-- 
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-t...@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.



Re: [Rails] Re: Re: Email marketing services

2010-11-29 Thread Peter Bell
I'd qualify this. I have a number of clients who send out a modest number of 
confirmation emails and yet have managed to get blacklisted by various ISPs 
over the years.

It is factually correct that sending too many emails is not the issue. it's 
more to do with the content of the email, the sending patterns, the number of 
similar emails sent in a given time period to different users, how many users 
mark the messages as spam (even if they aren't). That said, I have found that 
there are definite deliverability issues with sending out even things like 
order confirmation emails and I love to offload the deliverability issues on 
business that specialize in deliverability.

Best Wishes,
Peter

On Nov 29, 2010, at 4:52 PM, Marnen Laibow-Koser wrote:

> Greg Ma wrote in post #964904:
>> Peter De Berdt wrote in post #964797:
>> 
>>> If you just want to send out confirmation mails, what's wrong with
>>> using the local mailserver?
>> 
>> I might be wrong but if we send too many emails from our server aren't
>> we getting black listed by gmail, hotmail, yahoo and so on?
> 
> You are indeed wrong.
> 
> Best,
> --
> Marnen Laibow-Koser
> http://www.marnen.org
> mar...@marnen.org
> 
> -- 
> 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-t...@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.
> 

-- 
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-t...@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: Checking parameters

2010-11-29 Thread Marnen Laibow-Koser
turkan wrote in post #964900:
>> You can DRY it by putting it in a method.
>
> In what method should I put it that is visible in all models? In an
> extra lib class?

Probably.

>
>>
>> I also have to wonder why a _model_ is worrying about page number and 
>> per_page.
>
> I pass it to a model method that does some Sphinx search. What would
> be a better way? The search expression is so long, so I thought it
> would be good to keep it out of my controller (everybody says "keep
> your controller thin").

Then you probably want a separate model to talk to Sphinx, then call 
Sphinx.search(params[:criteria]) in your controller.  Or maybe you want 
a utility class to do this.  It really depends on the structure of your 
app.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

-- 
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-t...@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: Re: Email marketing services

2010-11-29 Thread Greg Ma
Peter De Berdt wrote in post #964797:

> If you just want to send out confirmation mails, what's wrong with
> using the local mailserver?

I might be wrong but if we send too many emails from our server aren't 
we getting black listed by gmail, hotmail, yahoo and so on?

-- 
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-t...@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: Fragment cache directory names in Rails 3

2010-11-29 Thread Robert R.
Conrad Taylor wrote in post #964899:
> On Mon, Nov 29, 2010 at 12:51 PM, Robert R. 
> wrote:
>
>> Is there a way to set the directory structure for the fragment cache?
>
>
> Yes, you can use the following:
>
> config.cache_store = :file_store, "/path/to/cache/directory"
>
>
>> I
>> know by default it is using Zlib.adler32 to generate the directory name
>> for a key.
>>
>> Is there any way to configure this? I want to be able to clear the
>> fragment cache externally from the app by a different process.
>>
>>
> It seems that :mem_cache_store may be what you're looking for
> because it uses a seperate process to manage an application's
> cache.  However, it's in memory instead of the disk.  I would
> recommend reading the following for additional information:
>
> http://guides.rubyonrails.org/caching_with_rails.html
>
> Good luck,
>
> -Conrad

Well, all that does for me is allow me to move the cache directory. It 
does not allow me to set the directory name structure. I want 
predictable names (views/domain/controller/action/key for example), not 
0EF/2FF/(etc).

I retested it just to make sure. I set it to be "tmp/cache2"

Here is my cache2 directory

cd tmp/cache2/
Robert-Rouses-MacBook-Pro:cache2 robertrouse$ ls
152  154  1BE  210  4BA

-- 
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-t...@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: Checking parameters

2010-11-29 Thread turkan
> You can DRY it by putting it in a method.

In what method should I put it that is visible in all models? In an
extra lib class?

>
> I also have to wonder why a _model_ is worrying about page number and 
> per_page.

I pass it to a model method that does some Sphinx search. What would
be a better way? The search expression is so long, so I thought it
would be good to keep it out of my controller (everybody says "keep
your controller thin").


-- 
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-t...@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.



Re: [Rails] Re: Re: Re: no such file to load -- sqlite3 WITH mysql2

2010-11-29 Thread Colin Law
On 29 November 2010 20:58, Steve Mills  wrote:
> Colin Law wrote in post #964874:
>> On 29 November 2010 17:48, Steve Mills  wrote:
>>> [...]
>>> Following the book, and creating my own project, I don't encounter this
>>> problem. But I do encounter a serious problem on "test functionals"
>>> where the db tables are created, seeded, and then promptly dropped prior
>>> to the first test running so all the tests fail. The application itself
>>> works fine.
>>
>> Are you using fixtures?  I think most now would advise against
>> fixtures, suggesting factories instead.  See
>> http://railscasts.com/episodes/158-factories-not-fixtures for example.
>>  So if you can't get fixtures to work (or even if you can) then forget
>> them and move to something better.
>>
>> Colin
>
> Thanks Colin. I'll take that on board. Yes, the Agile book's tutorial
> uses fixtures and that's what I think caused the original problem.
> Trouble is, I'm trying to learn Rails and I'm using this book as my
> tutor. Can't run before walking I guess.
>
> I'll follow the link and see if I can understand how to keep on
> following the tutorials but switch to factories. :)

The tutorial at http://railstutorial.org/ is good and uses factories
and rspec if I remember correctly.  I think you can buy the book or
work through it online for free.

Colin
Colin

-- 
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-t...@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.



Re: [Rails] Fragment cache directory names in Rails 3

2010-11-29 Thread Conrad Taylor
On Mon, Nov 29, 2010 at 12:51 PM, Robert R.  wrote:

> Is there a way to set the directory structure for the fragment cache?


Yes, you can use the following:

config.cache_store = :file_store, "/path/to/cache/directory"


> I
> know by default it is using Zlib.adler32 to generate the directory name
> for a key.
>
> Is there any way to configure this? I want to be able to clear the
> fragment cache externally from the app by a different process.
>
>
It seems that :mem_cache_store may be what you're looking for
because it uses a seperate process to manage an application's
cache.  However, it's in memory instead of the disk.  I would
recommend reading the following for additional information:

http://guides.rubyonrails.org/caching_with_rails.html

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-t...@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.
>
>

-- 
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-t...@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] Dependency Problem

2010-11-29 Thread John
I've seen people post similar issues at various places, but I have yet
to find an explanation on how to resolve this issue. I'm a new Rails
user, so I need a little adult supervision please.

I carelessly ran a "gem update" this morning and it updating a couple
gems. Since that point, I've been unable to use rails. When I attempt
to, I get the error:
"/Library/Ruby/Site/1.8/rubygems.rb:779:in 'report_activate_error':
RubyGem version error: builder(3.0.0 not ~> 2.1.2) (Gem::LoadError)"

There were a few additional lines. If those would be helpful in
troubleshooting this error, please let me know.

As far as I can tell, this is a dependency issue. I tried uninstalling
the builder gem and reinstalling it. That didn't fix the error. I
tried uninstalling the rails gem and it's dependencies and reinstalled
them all. That also didn't fix it. I'm at a loss for what to do.

Your suggestions and guidance are appreciated.

-- 
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-t...@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: Error installing rails 3, get error: mail requires i18n (~> 0.4.1, runtime)

2010-11-29 Thread HENRI
This is probably because you have 2 version of the same gem installed.

Do this:

Gem uninstall i18n

Select gem to uninstall
1. i18n-0.4.2
2. i18n-0.5.0
3. All versions

select 2

then install rails
gem install rails --force

this should work


Henrik



On Nov 29, 12:54 pm, Mike Moretti  wrote:
> Hi folks:
>
> I have Windows XP Pro SP3. I have installed ruby 1.9.2p0   (2010-08-18
> [i386-mingw32]). I’m trying to install rails 3 by entering  “gem install
> rails” on command prompt window (i.e. DOS window). Halfway through
> installation I get the following:
>
> ERROR: Error installing rails:
>        mail requires i18n (~> 0.4.1, runtime)
>
> Can anyone help please?
>
> Mike
>
> --
> 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-t...@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: Facebook like page Count

2010-11-29 Thread Andrew M. Kasper
On Nov 29, 9:57 am, Walter Lee Davis  wrote:
> On Nov 29, 2010, at 3:07 AM, rajeevsharma86 wrote:
>
> > fan count of an facebook  page

This is in no way a Rails question, but here's a short answer anyway:

1. Get the ID or vanity ID of the page you're interested in. (Ex:
"40796308305" or "cocacola")
2. GET http://graph.facebook.com/
3. You will receive a JSON object. Within that object, there is a
"fan_count".

For an example, take a look at http://graph.facebook.com/cocacola

If you want more help, you'll need to either find the right mailing
list or figure out how this question relates to Rails.

-- 
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-t...@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: Error installing rails 3, get error: mail requires i18n (~> 0.4.1, runtime)

2010-11-29 Thread Jonathan
I'm getting the same error using RVM on Mac OS X Snow Leopard. This
error was not happening just last week with the same setup.

On Nov 29, 12:54 pm, Mike Moretti  wrote:
> Hi folks:
>
> I have Windows XP Pro SP3. I have installed ruby 1.9.2p0   (2010-08-18
> [i386-mingw32]). I’m trying to install rails 3 by entering  “gem install
> rails” on command prompt window (i.e. DOS window). Halfway through
> installation I get the following:
>
> ERROR: Error installing rails:
>        mail requires i18n (~> 0.4.1, runtime)
>
> Can anyone help please?
>
> Mike
>
> --
> 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-t...@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: can't activate i18n (~> 0.4.1, runtime) for ["mail-2.2.10"

2010-11-29 Thread John
I'm having this issue and uninstalling and reinstalling didn't solve
the problem for me. It's some kind of dependency issue because
everything worked before I ran a gem update. I'm just not sure how to
resolve a rails dependency issue.

Please help!

On Nov 22, 10:31 am, Asif Jan  wrote:
> well doing a fresh installation of ruby 1.9.2 , rubygems 1.3.7  (all
> from sources) resolved the problem.
>
> aj
>
> On Nov 22, 2:47 pm, Asif Jan  wrote:
>
>
>
>
>
>
>
> > Hi
>
> > Using RoR 3.0.3 on Mac OS X, and am running into the dependency
> > problems. Please see the error below. I thought bundler was meant to
> > precisely avoid these problems?  thanks a lot for your help
>
> > I tried bundle install / check , deleted old lockfile and regenerate
> > it, but nothing worked.
>
> > rails generate controller testcontroller index
> > /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:233:in `activate':
> >can'tactivatei18n (~> 0.4.1, runtime) for ["mail-2.2.10",
> > "actionmailer-3.0.3", "rails-3.0.3"], already activated
> > i18n-0.5.0beta1 for ["activemodel-3.0.3", "actionpack-3.0.3",
> > "rails-3.0.3"] (Gem::LoadError)
> >         from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:249:in
> > `activate'
> >         from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:248:in `each'
> >         from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:248:in
> > `activate'
> >         from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:249:in
> > `activate'
> >         from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:248:in `each'
> >         from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:248:in
> > `activate'
> >         from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:249:in
> > `activate'
> >         from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:248:in `each'
> >         from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:248:in
> > `activate'
> >         from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:1082:in `gem'
> >         from /opt/local/bin/rails:18
>
> > Thanks a lot

-- 
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-t...@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.



Re: [Rails] Checking parameters

2010-11-29 Thread Colin Law
On 29 November 2010 20:30, turkan  wrote:
> Hi.
>
> I am often checking the same parameters (like param[:page] and
> param[:per_page]) in models over and over again (are those in a
> specific range ... if not use defaults):
> page = !options[:page].blank? && options[:page] =~ /^[0-9]+$/ &&
> options[:page].to_i > 0 ? options[:page].to_i : 1
> per_page = !options[:per_page].blank? && options[:per_page] =~ /^[0-9]+
> $/ && options[:per_page].to_i > 0 && options[:per_page].to_i <= 100 ?
> options[:per_page].to_i : 10
>
> How can I make this more DRY and easier to read?

You can make it easier to read by using simpler constructs such as if.
 It will take up a few more lines of source code but will not have any
measurable effect on execution time, and will be much easier for those
that come after you to understand.

You can DRY it by putting it in a method.

I also have to wonder why a _model_ is worrying about page number and per_page.

Colin

-- 
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-t...@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: Re: Re: no such file to load -- sqlite3 WITH mysql2

2010-11-29 Thread Steve Mills
Colin Law wrote in post #964874:
> On 29 November 2010 17:48, Steve Mills  wrote:
>> [...]
>> Following the book, and creating my own project, I don't encounter this
>> problem. But I do encounter a serious problem on "test functionals"
>> where the db tables are created, seeded, and then promptly dropped prior
>> to the first test running so all the tests fail. The application itself
>> works fine.
>
> Are you using fixtures?  I think most now would advise against
> fixtures, suggesting factories instead.  See
> http://railscasts.com/episodes/158-factories-not-fixtures for example.
>  So if you can't get fixtures to work (or even if you can) then forget
> them and move to something better.
>
> Colin

Thanks Colin. I'll take that on board. Yes, the Agile book's tutorial 
uses fixtures and that's what I think caused the original problem. 
Trouble is, I'm trying to learn Rails and I'm using this book as my 
tutor. Can't run before walking I guess.

I'll follow the link and see if I can understand how to keep on 
following the tutorials but switch to factories. :)

-- 
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-t...@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] Rails 3 rspec 2 rendering XML repsonse.should contain(.to_xml)

2010-11-29 Thread GregD
Hi all,

Is there an issue with Rails 3 or rspec 2 that the
repond_with({"success" => "test") where the response is not an xml
text?

I have almost converted an old Rails 2 app to Rails 3 and having an
issue with the rspec tests and the response content for xml.  It works
for json, but not xml.

Say I have something like this.

SimpleController < ActionController::Base

  respond_to :html, :xml, :json

  def test_action
 @foo = { "success" => "test" }
 respond_with(@foo) do |format|
   format.html { render :text => "success"}
end
  end
end

When I tested the xml rendering, I check the response contains
(have_text in rails 2) for the content.  In the past (rails 2 and
rspec 1.x), I would test this as:
response.should have_text("
\n\n  test\n\n")

I converted the 'have_text' to 'contain' to read:
response.should contain("
\n\n  test\n\n")

This spec fails with on xml and not json:

 Failure/Error: response.should contain(success_text)
 expected the following element's content to include "
 
   xml
 
 ":
 test

It looks like, the response is only "test" which is the value of the
hash.

On json the response is as expected:  {"success":"test"}.

Sorry for the lame example, but I really did not want to go into big
long explanation of the "real" test code.  Basically, I test the
response and it should contain valid xml or json based on the format.
I even tried response.body and it fails.  Is this a rspec issue?  I
did a pp of the response and the body does look like the expected
result.

Has anyone come across this?

Thanks,

GregD

-- 
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-t...@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: Re: Re: no such file to load -- sqlite3 WITH mysql2

2010-11-29 Thread Marnen Laibow-Koser
Colin Law wrote in post #964874:
> On 29 November 2010 17:48, Steve Mills  wrote:
>> [...]
>> Following the book, and creating my own project, I don't encounter this
>> problem. But I do encounter a serious problem on "test functionals"
>> where the db tables are created, seeded, and then promptly dropped prior
>> to the first test running so all the tests fail. The application itself
>> works fine.
>
> Are you using fixtures?  I think most now would advise against
> fixtures, suggesting factories instead.  See
> http://railscasts.com/episodes/158-factories-not-fixtures for example.
>  So if you can't get fixtures to work (or even if you can) then forget
> them and move to something better.

Agreed.  Also forget about functional tests and use Cucumber instead. 
In fact, forget about Test::Unit and go for RSpec.

The Rails core team made a wonderfully testable framework, but provided 
poor testing tools to actually do that testing.

>
> Colin

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

-- 
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-t...@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: How to get all models,controller,action and method names

2010-11-29 Thread pepe
> 
>       # This creates an anonymous singleton class in which I declare
>       # a public method that accesses private method 'action_methods',
>       # which returns the controller actions
>       class << controller
>         def my_action_methods
>           action_methods
>         end
>       end
> 

Maybe I should have mentioned that now you can access the controller
actions with:


  controller.my_action_methods


-- 
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-t...@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] Fragment cache directory names in Rails 3

2010-11-29 Thread Robert R.
Is there a way to set the directory structure for the fragment cache? I
know by default it is using Zlib.adler32 to generate the directory name
for a key.

Is there any way to configure this? I want to be able to clear the
fragment cache externally from the app by a different process.

-- 
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-t...@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.



Re: [Rails] Re: Re: no such file to load -- sqlite3 WITH mysql2

2010-11-29 Thread Colin Law
On 29 November 2010 17:48, Steve Mills  wrote:
> [...]
> Following the book, and creating my own project, I don't encounter this
> problem. But I do encounter a serious problem on "test functionals"
> where the db tables are created, seeded, and then promptly dropped prior
> to the first test running so all the tests fail. The application itself
> works fine.

Are you using fixtures?  I think most now would advise against
fixtures, suggesting factories instead.  See
http://railscasts.com/episodes/158-factories-not-fixtures for example.
 So if you can't get fixtures to work (or even if you can) then forget
them and move to something better.

Colin

-- 
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-t...@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] How to get all models,controller,action and method names

2010-11-29 Thread pepe
Answering the following post that I could not (did not know how to) re-
open:

http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/6d9a5679d73b0a6b/d17adc61119d2acc?lnk=gst&q=All+controllers%27+action+names#d17adc61119d2acc

I have been working on getting a list of all actions in every
controller of my application to automate certain process. I found a
couple of links with some useful information that lead me to write
this code:


# This produces an array with subclasses names.
ApplicationController.subclasses.sort.each do |subclass|

  # This creates a new instance of a controller based on the
subclass name.
  controller = subclass.constantize.new

  # This creates an anonymous singleton class in which I declare
  # a public method that accesses private method 'action_methods',
  # which returns the controller actions
  class << controller
def my_action_methods
  action_methods
end
  end


I hope this helps somebody.

-- 
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-t...@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: Checking parameters

2010-11-29 Thread Marnen Laibow-Koser
turkan wrote in post #964861:
> Hi.
>
> I am often checking the same parameters (like param[:page] and
> param[:per_page]) in models over and over again (are those in a
> specific range ... if not use defaults):
> page = !options[:page].blank? && options[:page] =~ /^[0-9]+$/ &&
> options[:page].to_i > 0 ? options[:page].to_i : 1
> per_page = !options[:per_page].blank? && options[:per_page] =~ /^[0-9]+
> $/ && options[:per_page].to_i > 0 && options[:per_page].to_i <= 100 ?
> options[:per_page].to_i : 10
>
> How can I make this more DRY and easier to read?

Well, first of all, the code you provided is a classic example of 
obfuscated Ruby.  You can make it more readable by using if instead of 
?: .

Now, as far as the repetition of the conditions themselves, just do the 
same thing you'd do for any other repeated code: extract it into a 
method of its own.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

-- 
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-t...@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] Checking parameters

2010-11-29 Thread turkan
Hi.

I am often checking the same parameters (like param[:page] and
param[:per_page]) in models over and over again (are those in a
specific range ... if not use defaults):
page = !options[:page].blank? && options[:page] =~ /^[0-9]+$/ &&
options[:page].to_i > 0 ? options[:page].to_i : 1
per_page = !options[:per_page].blank? && options[:per_page] =~ /^[0-9]+
$/ && options[:per_page].to_i > 0 && options[:per_page].to_i <= 100 ?
options[:per_page].to_i : 10

How can I make this more DRY and easier to read?

-- 
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-t...@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: wrong number of arguments error

2010-11-29 Thread Marnen Laibow-Koser
John Merlino wrote in post #964846:
> You are right. It worked. Nevertheless, the behavior was the same. We
> instantiated an object and called a constructor method of the class.
> Both User and UsersController are classes. I don't know what is causing
> the behavior to be different.

Gee, do you think it could have something to do with the fact that they 
inherit from different parents -- which could change the behavior?

> Are there any good books on MVC design
> patterns? I already have the book Design Patterns in Ruby and I don't
> see MVC mentioned in it. Thanks for response.

Any basic Rails reference (including the Guides) explains how Rails uses 
MVC.  You probably don't need Design Patterns in Ruby for *anything* at 
this stage...

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

-- 
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-t...@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: Error installing rails 3, get error: mail requires i18n (~> 0.4.1, runtime)

2010-11-29 Thread Joseph R.
Then before I could 'rails new' a project I had to do the following:

gem uninstall i18n

then choose to i18n 0.5.0 which was my option 2.

-- 
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-t...@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.



Re: [Rails] incompatible character encodings: ASCII-8BIT and UTF-8

2010-11-29 Thread Conrad Taylor
On Mon, Mar 29, 2010 at 5:21 AM, Heinz Strunk  wrote:

> Hello,
>
> I just tried to migrate one of my applications from ruby 1.8 to ruby 1.9
> and get following error:
>  Showing app/views/layouts/application.html.erb where line #48  raised:
>  incompatible character encodings: ASCII-8BIT and UTF-8
>
>  48: <%= render :partial => 'layouts/menu' %>
>
> I added "<%# coding: utf-8 %>" in application.html.erb and
> layouts/_menu.rhtml but it still throws that error, anyone knows why?
>

Hey, I would recommend using Ruby 1.9.2 instead of Ruby 1.9.1.  Next,
mysql2 gems is not only faster than the ruby-mysql gem but it provides
the following benefits:

The Mysql2 gem is meant to serve the extremely common use-case of
connecting, querying and iterating on results. Some database libraries out
there serve as direct 1:1 mappings of the already complex C API’s available.
This one is not.

It also forces the use of UTF-8 [or binary] for the connection [and all
strings in 1.9, unless Encoding.default_internal is set then it’ll convert
from UTF-8 to that encoding] and uses encoding-aware MySQL API calls where
it can.
For more information, please see the following:

https://github.com/brianmario/mysql2

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-t...@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.
>
>

-- 
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-t...@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: Re: Re: Re: no such file to load -- sqlite3 WITH mysql2

2010-11-29 Thread Steve Mills
Hassan Schroeder wrote in post #964841:
> On Mon, Nov 29, 2010 at 10:42 AM, Steve Mills 
> wrote:
>
>> Clearly what is required is a single parameter which specifies the
>> database, something like, localhost:@/depot_v_development
>
> Uh, "clearly"? Actually, "clearly" that's not true -- and which would be
> quite "clear" if you read the documentation for the method in question:
>
>ActiveRecord::Base.establish_connection
>
> which, at least in the 2.3.8 version I just glanced at, has examples for
> both SQLite and MySQL...
>
> --
> Hassan Schroeder  hassan.schroe...@gmail.com
> twitter: @hassan

OK. My apologies. I didn't know where to look, but I've found it now, 
and as you say, it does have an example for MySQL.

Thank you for your patience.

-- 
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-t...@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: Forking a process

2010-11-29 Thread Frederick Cheung


On Nov 29, 4:29 pm, Raghu 2009  wrote:
> Hi,
>
> When i am forking a process to run a piece of code into independent
> process,
> I usually get the mysql connection error. Does for each of the forked
> process
> i need to establish a new mysql connection.?

That is one of the things you have to be careful about when using
fork, you may end up sharing stuff with the parent process that you
didn't want to share. You can use
ActiveRecord::Base.clear_all_connections! to close existing
connections

Fred
>
> Can any one suggest me on this?
>
> --
> 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-t...@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: wrong number of arguments error

2010-11-29 Thread Frederick Cheung


On Nov 29, 7:34 pm, John Merlino  wrote:
> You are right. It worked. Nevertheless, the behavior was the same. We
> instantiated an object and called a constructor method of the class.
> Both User and UsersController are classes. I don't know what is causing
> the behavior to be different.

Rails creates an instance of your controller for you as part of the
request handling process, and is probably expecting a controllers
initialize method to take 0 arguments, but since you've changed the
signature of initialize that blows up. Overriding initialize like that
on a subclass of ActiveRecord will also cause trouble but it might
take a little longer for you to get into trouble.

Fred
>Are there any good books on MVC design
> patterns? I already have the book Design Patterns in Ruby and I don't
> see MVC mentioned in it. Thanks for response.
>
> --
> 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-t...@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: wrong number of arguments error

2010-11-29 Thread John Merlino
You are right. It worked. Nevertheless, the behavior was the same. We 
instantiated an object and called a constructor method of the class. 
Both User and UsersController are classes. I don't know what is causing 
the behavior to be different. Are there any good books on MVC design 
patterns? I already have the book Design Patterns in Ruby and I don't 
see MVC mentioned in it. Thanks for response.

-- 
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-t...@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] rspec-core-2.2.1 is released!

2010-11-29 Thread David Chelimsky
### rspec-core-2.2.1 / 2010-11-28

[full changelog](http://github.com/rspec/rspec-core/compare/v2.2.0...master)

* Bug fixes
  * alias_method instead of override Kernel#method_missing (John Wilger)
  * changed --autotest to --tty in generated command (MIKAMI Yoshiyuki) 
  * revert change to debugger (had introduced conflict with Rails)
* also restored --debugger/-debug option

-- 
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-t...@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.



Re: [Rails] Re: find duplicates in each array rails

2010-11-29 Thread Michael Pavling
On 29 November 2010 16:23, PalaniKannan K  wrote:
> Yes I accept, any other way to extract the distinct content from each array?

Which array? The "sp_ref.all_references" array that you're iterating,
or a different one?

Are you're asking "how would I get a collection of distinct
"reference" values from each collection of "sp_ref.all_references"?

If so this might help...

<% @sp_references.each do |sp_ref| %>
  <%= sp_ref.all_references.map(&:reference).uniq.delete_if{|ref| ref
=~ /emend$/i}.join("") %>
<% end %>

... you could break it apart into separate operations if you wished.

-- 
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-t...@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: Error installing rails 3, get error: mail requires i18n (~> 0.4.1, runtime)

2010-11-29 Thread Joseph R.
I ran:

gem install mail

then

gem install rails

and was able to get past that error.

-- 
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-t...@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: wrong number of arguments error

2010-11-29 Thread Marnen Laibow-Koser
John Merlino wrote in post #964838:
> Hey all,
>
> I did a script/generate controler users in console.
>
> Then I added the following to users controller:
>
> class UsersController < ApplicationController
>   def initialize(first_name, last_name)
> @first_name = first_name
> @last_name = last_name
>   end
>
>   def full_name()

You don't need the empty parentheses.

> return "#...@first_name} + #...@last_name}"
>   end
> end
>

No!  These methods belong in the model, not the controller.  Review MVC 
philosophy: a model object represents data.  The controller mediates 
between the model and the view.

> I have this in users/index.html.erb
>
> <% user = UsersController.new("John", "Merlino") %>

Again, you want User, not UsersController.

>
> <%= puts(user.full_name()) %>
>
> and in routes:
>   map.root :controller => 'users'
>
> I get error:
> ArgumentError in UsersController#index
>
> wrong number of arguments (0 for 2)
>
> Thanks for response.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

-- 
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-t...@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.



Re: [Rails] Re: Re: Re: no such file to load -- sqlite3 WITH mysql2

2010-11-29 Thread Hassan Schroeder
On Mon, Nov 29, 2010 at 10:42 AM, Steve Mills  wrote:

> Clearly what is required is a single parameter which specifies the
> database, something like, localhost:@/depot_v_development

Uh, "clearly"? Actually, "clearly" that's not true -- and which would be
quite "clear" if you read the documentation for the method in question:

   ActiveRecord::Base.establish_connection

which, at least in the 2.3.8 version I just glanced at, has examples for
both SQLite and MySQL...

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

-- 
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-t...@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] wrong number of arguments error

2010-11-29 Thread John Merlino
Hey all,

I did a script/generate controler users in console.

Then I added the following to users controller:

class UsersController < ApplicationController
  def initialize(first_name, last_name)
@first_name = first_name
@last_name = last_name
  end

  def full_name()
return "#...@first_name} + #...@last_name}"
  end
end

I have this in users/index.html.erb

<% user = UsersController.new("John", "Merlino") %>

<%= puts(user.full_name()) %>

and in routes:
  map.root :controller => 'users'

I get error:
ArgumentError in UsersController#index

wrong number of arguments (0 for 2)

Thanks for response.

-- 
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-t...@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: Re: Re: no such file to load -- sqlite3 WITH mysql2

2010-11-29 Thread Marnen Laibow-Koser
Steve Mills wrote in post #964833:
> Marnen Laibow-Koser wrote in post #964825:
>
>> Your development environment is no concern of your customers.  What do
>> you mean by "that's what my customers want"?  Why do you think you need
>> to work on Windows?  Remember, you're developing *server-side*
>> applications here that have nothing to do with the client OS.
>
> That's true for just this one aspect of development. I also use
> OutSystems which runs on Windows, .NET which requires Windows, Prolog
> which runs best on Windows, and build free-standing apps that target
> Windows,

Well, Rails runs best on a *nix system.  I highly recommend at least a 
VM.

> I build Fusion:Gen apps where the case tools run on Windows,
> and Android apps where the tools that I use are Windows based.

Uh...WTF?  Android development is not platform-specific.

Besides, the less you use Windows, the better.  If your tools are tying 
you to Windows, you really need better tools.

>
> But I guess this is wandering off the point of this thread :)

Slightly.  But you seem to be under a misapprehension as to how much you 
*need* to use Windows.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

-- 
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-t...@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: Re: Re: no such file to load -- sqlite3 WITH mysql2

2010-11-29 Thread Steve Mills
Hassan Schroeder wrote in post #964823:
> On Mon, Nov 29, 2010 at 9:48 AM, Steve Mills 
> wrote:
>
>>> The line above is *wrong* -- look at your config/database.yml entries
>>> and compare. That is simply not a valid MySQL entry.
>
>> I know that line is wrong - Rails tells me that - what I don't know is
>> how to fix it, or even why the store.rb file exists at all in the app
>> folder.
>
> And I've told you twice how to fix it. Seriously, WTF?
>
> --
> Hassan Schroeder  hassan.schroe...@gmail.com
> twitter: @hassan

I have followed the advice but it didn't help...

Database.yml contains entries like:-

development:
  adapter: mysql2
  encoding: utf8
  reconnect: false
  database: depot_v_development
  pool: 5
  username: 
  password: 
  host: localhost

which is a database specification broken into multiple elements.

Clearly what is required is a single parameter which specifies the 
database, something like, localhost:@/depot_v_development

Unfortunately I don't know the required syntax and database.yml doesn't 
provide it.

So yes, the advice appears good, but for me it's incomplete.

If I delete that section of code then the db:migrate works. So now I'm 
going to see if everything else still works with it deleted.

I'll report back.

-- 
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-t...@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: Re: Re: no such file to load -- sqlite3 WITH mysql2

2010-11-29 Thread Steve Mills
Marnen Laibow-Koser wrote in post #964825:

> Your development environment is no concern of your customers.  What do
> you mean by "that's what my customers want"?  Why do you think you need
> to work on Windows?  Remember, you're developing *server-side*
> applications here that have nothing to do with the client OS.

That's true for just this one aspect of development. I also use 
OutSystems which runs on Windows, .NET which requires Windows, Prolog 
which runs best on Windows, and build free-standing apps that target 
Windows, I build Fusion:Gen apps where the case tools run on Windows, 
and Android apps where the tools that I use are Windows based.

But I guess this is wandering off the point of this thread :)

-- 
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-t...@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: Error heroku: App Crashed

2010-11-29 Thread Marnen Laibow-Koser
Emanuel wrote in post #964747:
> ok can  u tell me how can i chage to sqlite3 to postgres for the
> application that  i have already developed..

You don't need to, since Heroku knows how to find its own database. 
Just make sure you're not requiring the sqlite3 gem.

> infact i does not need any
> database(for this particular application) as all my webpages are
> static ones,...

Then don't use Rails or Heroku.  Just upload the static HTML files to 
your ISP's hosting space and have done with it.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

-- 
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-t...@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: incompatible character encodings: ASCII-8BIT and UTF-8

2010-11-29 Thread Marnen Laibow-Koser
Please quote when replying.

Gjermund Lunder wrote in post #964821:
> Because unfortunately innoDB tables don’t support full text searching of
> UTF-8 encoded content.

I know that, but I didn't think full-text searching was at issue here. 
Perhaps I misread.

The fact that you have to choose is a major reason that I no longer use 
or recommend MySQL.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

-- 
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-t...@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: Re: Re: no such file to load -- sqlite3 WITH mysql2

2010-11-29 Thread Marnen Laibow-Koser
Steve Mills wrote in post #964810:
> Colin Law wrote in post #964799:
>> I seriously suggest considering switching to Ubuntu (or similar).  You
>> would not regret it...
>
> I am doing the tutorials in parallel on Ubuntu. Unfortunately the "test
> functionals" issue I mentioned above that started me down this path
> occurs there too.
>
> My primary development platform has to be Windows I'm afraid - that's
> what my customers want - but I do as much as possible on Ubuntu as well.
> :)

Your development environment is no concern of your customers.  What do 
you mean by "that's what my customers want"?  Why do you think you need 
to work on Windows?  Remember, you're developing *server-side* 
applications here that have nothing to do with the client OS.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

-- 
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-t...@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.



Re: [Rails] Re: Re: no such file to load -- sqlite3 WITH mysql2

2010-11-29 Thread Hassan Schroeder
On Mon, Nov 29, 2010 at 9:48 AM, Steve Mills  wrote:

>> The line above is *wrong* -- look at your config/database.yml entries
>> and compare. That is simply not a valid MySQL entry.

> I know that line is wrong - Rails tells me that - what I don't know is
> how to fix it, or even why the store.rb file exists at all in the app
> folder.

And I've told you twice how to fix it. Seriously, WTF?

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

-- 
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-t...@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: incompatible character encodings: ASCII-8BIT and UTF-8

2010-11-29 Thread Gjermund Lunder
Because unfortunately innoDB tables don’t support full text searching of 
UTF-8 encoded content. But innoDB tables are more flexible in general.
Source of information: 
http://dev.mysql.com/doc/refman/5.1/en/fulltext-restrictions.html and 
http://www.dotmana.com/?p=95.
This might not be relevant, but could be.

Robert K. (or others), If you do have have the exact line for the 
enforce coding and in witch erb files to put it I would be happy.

PS:
I've tried  
(http://www.igvita.com/2007/04/11/secure-utf-8-input-in-rails/) in the 
top of my app/views/layout/application.html.erb
I thought this would force the browser to use UFT-8. But not. I'm able 
to force the browser to show content after the page is read with right 
click- Encoding on screen (but only i just one of the string columns 
contains a special characters - strange).

-- 
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-t...@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] file_field and rails3

2010-11-29 Thread eugenio
Hello everybody,
i need to manage file uploads with a new rails application.
I proceded as i did with rails2
- declared the form as multipart
<%= form_for(@photo, :html => {:multipart => true}) do |f| %>

- and added the file_field tag
<%= f.label :uploaded_data %>
<%= f.file_field :uploaded_data %>

the form shows up correctly, but after submit i receive an error:
500 Internal Server Error

If you are the administrator of this website, then please read this
web application's log file and/or the web server's log file to find
out what went wrong.

in the server log i get this:
TypeError (can't convert nil into Integer):

the controller is still the one produced by the "rails scaffold", so
it should work fine (obviously i don't expect it to really save the
file).

What am i missing?

Using:
ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0]
rails --version
Rails 3.0.0

-- 
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-t...@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] Error installing rails 3, get error: mail requires i18n (~> 0.4.1, runtime)

2010-11-29 Thread Mike Moretti
Hi folks:

I have Windows XP Pro SP3. I have installed ruby 1.9.2p0   (2010-08-18
[i386-mingw32]). I’m trying to install rails 3 by entering  “gem install
rails” on command prompt window (i.e. DOS window). Halfway through
installation I get the following:

ERROR: Error installing rails:
   mail requires i18n (~> 0.4.1, runtime)

Can anyone help please?

Mike

-- 
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-t...@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: Re: no such file to load -- sqlite3 WITH mysql2

2010-11-29 Thread Steve Mills
Hassan Schroeder wrote in post #964802:
> On Mon, Nov 29, 2010 at 8:35 AM, Steve Mills 
> wrote:
>> A bit more of the code - to clarify the origin...
>
> utterly irrrelevant.
>
>> :database => 'db/development.mysql2')
>
> The line above is *wrong* -- look at your config/database.yml entries
> and compare. That is simply not a valid MySQL entry.
>
> --
> Hassan Schroeder  hassan.schroe...@gmail.com
> twitter: @hassan

Hi Hassan,

The relevance was to show the full title and version number of the book 
from which this example code is taken, especially since I know many 
others are also reading and following that book and are having similar 
problems. Since many consider it the definitive work on Ruby on Rails 
then I think it's worth mentioning it. I agree the actual additional 
code shown beyond the comments in the header adds nothing to the problem 
analysis. :)

I know that line is wrong - Rails tells me that - what I don't know is 
how to fix it, or even why the store.rb file exists at all in the app 
folder.

However I downloaded this code from the web site associated with the 
book and that's why it's in there. The original code from the book uses 
sqlite but I prefer mysql and so changed it to use mysql.

Following the book, and creating my own project, I don't encounter this 
problem. But I do encounter a serious problem on "test functionals" 
where the db tables are created, seeded, and then promptly dropped prior 
to the first test running so all the tests fail. The applicaiton itself 
works fine.

So as one particular way of investigating this I decided to download the 
code from the book, reconfigure it for mysql, and see if the testing 
problem still exists. However I can't get beyond the db:migrate because 
of this problem being explored here.

Unfortunately, although I've spent many hours on RoR on both Windows 7 
and Ubuntu, the Rails aspects of it are IMHO poorly documented. Ruby 
language - yes good documentaiton and I understand that with no problem. 
But Rails is unusual in that you can place pieces of an Object in many 
places and they all come together at runtime, but if that fails to 
integrate properly then you're pretty much reliant on helpful guys like 
yourself online pointing you in the right direction.

I am working my way through...

(a) Agile Web Development with Rails Ed.4
(b) Rails Recipes
(c) RailsSpace: Building a Social Networking Website with Ruby on Rails
(d) Beginning Ruby on Rails E-Commerce

building all of the examples. But in each case I'm encountering problems 
and issues.

So if I can solve why "test functionals" keeps dropping the tables 
before running the tests then that would be the biggest help.

I realise that test mode is supposed to start with an empty database so 
that the tests always run the same. It then creates the tables, then it 
seeds them, then for some reason it drops the tables and runs the first 
test which failes because the tables don't exist.

I may be wrong here but I think it used to work before the seeds were 
written. That it was after the book covered seeds and the seeds file was 
created that this testing problem occured.

It might also have something to do with using mysql with myisam files 
because the transaction capability is different according to the Rails 
books (although I've not noticed that in the past).


Kind Regards
Steve

-- 
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-t...@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: Re: Re: no such file to load -- sqlite3 WITH mysql2

2010-11-29 Thread Steve Mills
Colin Law wrote in post #964799:
> I seriously suggest considering switching to Ubuntu (or similar).  You
> would not regret it...

I am doing the tutorials in parallel on Ubuntu. Unfortunately the "test 
functionals" issue I mentioned above that started me down this path 
occurs there too.

My primary development platform has to be Windows I'm afraid - that's 
what my customers want - but I do as much as possible on Ubuntu as well. 
:)

-- 
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-t...@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: display the first n words from a string

2010-11-29 Thread Marnen Laibow-Koser
Steve Austen wrote in post #964735:
> hi its seems like you have done a hard work on it. I have got lots of
>
> information from your post. Really appreciate your work.!! It was
>
> describe very nicely keep us doing good work..
> http://www.dealsourcedirect.com/ion-tape2pc.html

Can we ban this spammer?

Best,
-- 
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

Sent from my iPhone

-- 
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-t...@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: Heroku error msg:App Crashed

2010-11-29 Thread Marnen Laibow-Koser
Emanuel wrote in post #964744:
> /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/
> runtime.rb:64:in
>  `require': no such file to load -- sqlite3 (LoadError)
>
>
> u can see from the above line...i think it is an error regarding
> sqlite3 as i am using it with my application...and i think heroku is
> not supporting sqlite3...so what i have do now,,,

Take that line out.  Heroku can figure out what database gems it needs 
without your help.

Best,
-- 
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

Sent from my iPhone

-- 
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-t...@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.



Re: [Rails] Re: any gems to process PowerPoint files?

2010-11-29 Thread Walter Lee Davis

On Nov 29, 2010, at 10:49 AM, Andy wrote:


My client has PowerPoint files and we need to process them into images
and text.

I was hoping there was something out there that could do this
directly.

If anyone else has suggestions, please post.

Thanks



Not on the server, but PowerPoint itself can output a Web site from  
each file using File / Export. Something for a temp at your client's  
office to do all day long.


Walter



On Nov 26, 2:15 pm, gezope  wrote:

Hi,

I highly reccomend you Prezihttp://prezi.com/
and not any MS product, since they are not free, and not open-source,
so if any company makes anything which can use it - it still mean  
that

you or some will pay for it in the end. And mostly PowerPoint is
really out of date.
cheers
Zoltán

On nov. 23, 14:00, DBL Systems  wrote:







not sure if this will help but google docs just started providing  
3rd

party publishing/conversion from MS Office to google docs.  perhaps
this can get you part of the way by converting and using the gdata  
gem



http://code.google.com/apis/gdata/articles/gdata_on_rails.html



b



On Nov 22, 10:31 pm, Andy  wrote:


Does anyone know of any gems or plugins that can take a  
PowerPoint and

create images out of every slide and also access the text in each
slide?


--
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- 
t...@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 
.




--
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-t...@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.



Re: [Rails] Re: no such file to load -- sqlite3 WITH mysql2

2010-11-29 Thread Hassan Schroeder
On Mon, Nov 29, 2010 at 8:35 AM, Steve Mills  wrote:
> A bit more of the code - to clarify the origin...

utterly irrrelevant.

>  :database => 'db/development.mysql2')

The line above is *wrong* -- look at your config/database.yml entries
and compare. That is simply not a valid MySQL entry.

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

-- 
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-t...@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: Heroku error msg:App Crashed

2010-11-29 Thread Ar Chron
Emanuel wrote in post #964744:
> /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/
> runtime.rb:64:in
>  `require': no such file to load -- sqlite3 (LoadError)
>
>
> u can see from the above line...i think it is an error regarding
> sqlite3 as i am using it with my application...and i think heroku is
> not supporting sqlite3...so what i have do now,,,

Have you ensured that the sqlite3 gem is available?  There are tons of 
examples out on the web about setting up a basic Rails app. sqlite is 
the default database for Rails, but you have to get the gem yourself. 
And sqlite3 is fine for development (just you on your machine), but not 
so well suited for multi-user scenarios with updating.

A simple google for "sqlite3 rails install" should give you plenty of 
references.

-- 
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-t...@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.



Re: [Rails] Re: Re: no such file to load -- sqlite3 WITH mysql2

2010-11-29 Thread Colin Law
On 29 November 2010 16:33, Steve Mills  wrote:
> Colin Law wrote in post #964785:
>
>> To quote from your OP
>>> And a search of my project shows no files containing any reference to 
>>> sqlite3.
>
> What can I say? Windows 7 search is not too good. It brought up files
> that mentioned the target words in comments but it did not bring up this
> particular file. Because it brought back some files, and those files
> were lower down than the root, I assumed it had brought back all such
> files from all levels. Windows XP would have done that - no problem -
> but not it appears Windows 7.

I seriously suggest considering switching to Ubuntu (or similar).  You
would not regret it.  It seems possible that the time you have spent
trying to sort this problem would have covered getting you up and
running in Ubuntu.

Also I would suggest using a decent editor such as jEdit (others are
available) that supports sets of files (projects) and includes source
search that in this case in a few seconds would have found all
references to sqlite.  jEdit will run on Windows.

Colin

-- 
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-t...@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.



  1   2   >