[Rails] with_options

2009-01-04 Thread Sijo Kg

Hi
   why is this used in routes.rb I have code like below But I did not
understand what it means Could anybody please clarify this?

map.with_options(:controller => "companies") do |companies_map|

companies_map.companies_view_custom_field_permissions
'/companies/view_custom_field_permissions',
 :action => 'view_custom_field_permissions'

companies_map.with_options(:my_company => true) do |my_company_map|
  my_company_map.my_company
'/my_company/:company_id',  :action => 'show',
:company_id => 'root'

end

end

Thanks in advance
Sijo
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@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: Plugin not found: ["acts_as_list"]

2009-01-04 Thread Jason Newport

Andrew Bloom wrote:
> if the plugin is already installed in vendor/plugins there is no
> reason to install it with script/plugin.
> 
> On Jan 4, 6:48�pm, Jason Newport 

That is what I was thinking, but I was getting in errors in the console 
when I was trying to create new objects in the database giving me an 
error involving acts_as_list.

I shut down my computer and when I came back it worked.  I tried 
stopping my server and closed all terminal sessions and still didn't 
work until I rebooted my computer...now it works.

PICNIC = problem in chair not in computer!
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@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: Determining whether yields have content

2009-01-04 Thread James Englert
Just confirming, its expensive since it renders the yield twice, correct?
What if i did something like:

<% yield_contents  = yield(:submenu)
  if !yield_contents.strip.blank? -%>
   
<%= yield_contents %>
  
<% end -%>

Would that work?

I guess I never realized that I could yield twice.  Thanks for the tip. Much
appreciated.

On Sun, Jan 4, 2009 at 10:52 PM, s.ross  wrote:

>
> On Jan 4, 2009, at 7:18 PM, James Englert wrote:
>
> > Hey All,
> >I would like some logic that would help me determine whether a
> > yield has any content to it.  For example:
> >
> > 
> > <%= yield :submenu %>
> > 
> >
> > I only want to display the div around the yield if the yield will
> > have content.
> >
> > Any ideas?
>
> You can do:
>
> <% if !yield(:submenu).strip.blank? -%>
>
> <%= yield :submenu %>
>   
> <% end -%>
>
> The call may be expensive so you might want to create some other
> method of determining whether the submenu is likely to have content.
> But this should work.
>
> HTH
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Errno::ENXIO in Login#index

2009-01-04 Thread Nurzed Lkham

Hi ROR riders'

I've some apps working with rails and I got the following error when I
tried to log-in.

Errno::ENXIO in Login#index
Device not configured

The app works, but I cannot make a Login. I've re-started the mongrel
server and the app is working again, but after some logins and logouts
and adding data to the app, I got that error.

Does anyone knows what produces such error?


Thanks a lot,

--
OSX: FreeBSD 6.3
Ruby v 1.8.6
Rails v 2.2.2
Gem v 1.3.1
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@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 apply a patch to core rails using git?

2009-01-04 Thread Ram

oh ok.. so what about the version in my mac? will that get overridden?
will my existing apps know which Rails to use? I will have to change
the version number in the environment config file if im using edge
right?

On Jan 3, 4:06 pm, Frederick Cheung 
wrote:
> On 3 Jan 2009, at 10:06, Ram wrote:
>
>
>
> > i have rails already in my mac.. i cant find the folder though. it
> > came with the OS X Leopard.
>
> You'll need to get it from git. There's also no guarantee that it will  
> apply on anything but edge.
>
> Fred
>
>
>
> > On Jan 2, 3:11 pm, Frederick Cheung 
> > wrote:
> >> On 2 Jan 2009, at 04:47, Ram wrote:
>
> >>> There is a patch for using the :selected option with  
> >>> collection_select
> >>> here 
> >>> -http://rails.lighthouseapp.com/projects/8994/tickets/1037-selected-op
> >>> ...
> >>> .
>
> >>> Can someone tell me how to apply it? I have git 1.6.0.1 on leopard.
>
> >> Checkout rails from github and switch the relevant branch
> >> Download the patch file
> >> cd to where you have checked rails
> >> git am path/to/file
>
> >> Fred
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Determining whether yields have content

2009-01-04 Thread s.ross

On Jan 4, 2009, at 7:18 PM, James Englert wrote:

> Hey All,
>I would like some logic that would help me determine whether a  
> yield has any content to it.  For example:
>
> 
> <%= yield :submenu %>
> 
>
> I only want to display the div around the yield if the yield will  
> have content.
>
> Any ideas?

You can do:

<% if !yield(:submenu).strip.blank? -%>
   
 <%= yield :submenu %>
   
<% end -%>

The call may be expensive so you might want to create some other  
method of determining whether the submenu is likely to have content.  
But this should work.

HTH


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Determining whether yields have content

2009-01-04 Thread James Englert
Hey All,
   I would like some logic that would help me determine whether a yield has
any content to it.  For example:


<%= yield :submenu %>


I only want to display the div around the yield if the yield will have
content.

Any ideas?

Thanks,
Jim

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: How do booleans work?

2009-01-04 Thread Andrew Bloom

What Mike is hinting at is the way ActiveRecord abstracts database
differences. MySQL and SQLite3 probably use different column types but
this will appear transparent to the developer as ActiveRecord handles
serializing and de-serializing the column data into Ruby objects.

I am not a DBA, and I'm sure it varies from DB vendor to vendor, but I
would have to assume that the ActiveRecord Developers chose the most
appropriate column format (int(1) vs boolean) for each supported
database.

On Jan 4, 7:01 pm, James Byrne 
wrote:
> Mike Chai wrote:
> > I'm a little confused as to how booleans work in Rails. Which is
> > better in the database? boolean or int(1)? True == 1 and False == 0,
> > right? Using SQLite, I tried to set a value to true inside the
> > database but it gave me an error. MySql didn't, so I had to switch to
> > int(1) for it to work. Is this just how it is?
>
> No.  True == anything other than nil or false
>     False == False
>
> DBMS have their own specific ways of handling booleans.  The DBMS
> adapter handles converting that to a Ruby form.
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Plugin not found: ["acts_as_list"]

2009-01-04 Thread Andrew Bloom

if the plugin is already installed in vendor/plugins there is no
reason to install it with script/plugin.

On Jan 4, 6:48 pm, Jason Newport 
wrote:
> I am trying to install acts_as_list in a rails 2.2.2 project but when I
> try the following:  ruby script/plugin install acts_as_list
>
> I get:  Plugin not found: ["acts_as_list"]
>
> I had to download the acts_as_list plugin from the github because it
> isn't included in Rails 2.2.2.
>
> The files are in my vendor/plugins/acts_as_list folder so I have:
>
> lib/active_record/acts/list.rb
> README
> test/list_test.rb
> init.rb
>
> What am I doing wrong here?
>
> TIA
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: How to declare a member for a restful resource when it has a nested resource

2009-01-04 Thread Andrew Bloom

The collection and other options are just a hash being passed as
parameters to the resources method. The ruby language defines all
parameters before blocks in method calls. Try the following:

map.resources :cities, :collection =>  {:manage => :get} do |cities|
  cities.resources :venues, :collection =>  {:transfer => :any}
end

On Jan 4, 8:17 pm, Raj  wrote:
> Currently my routes.rb looks like this.
>
>   map.resources :cities do |cities|
>     cities.resources :venues, :collection =>      {:transfer => :any}
>   end
>
> Now I have a need to declare something like
>
>   map.resources :cities,    :collection =>  {:manage => :get}
>
> But since I have a nested resource for cities I am not sure what the
> syntax is to declare a collection on cities?
>
> Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Rendering partials from outside of Rails

2009-01-04 Thread Jeff

Thanks for the help on this. I figured out what my problem was.

render :partial works as advertised when used in a controller, but not
as a helper when used in a view (at least in Rails 2.0.2). The helper
version of render tries to tack the view path to the beginning of the
filepath no matter what. Instead, I used render_to_string form the
controller and used the string directly in the view. This may have
been fixed in a subsequent version of Rails.



On Jan 3, 9:58 am, pepe  wrote:
> From the API:
>
> File rendering works just like action rendering except that it takes a
> filesystem path. By default, the path is assumed to be absolute, and
> the current layout is not applied.
>
>   # Renders the template located at the absolute filesystem path
>   render :file => "/path/to/some/template.erb"
>   render :file => "c:/path/to/some/template.erb"
>
>   # Renders a template within the current layout, and with a 404
> status code
>   render :file => "/path/to/some/template.erb", :layout =>
> true, :status => 404
>   render :file => "c:/path/to/some/template.erb", :layout =>
> true, :status => 404
>
> Based on that you should be able to use one of the 2 first samples and
> modify it for your needs.
>
> Pepe
>
> On Jan 2, 1:39 pm, Jeff  wrote:
>
> > I'm using render :file, but as far as I can tell,Railsstill tacks
> > RAILS_ROOT/app/views to the beginning of the given filename. Is there
> > a way to disable this? Ideally, I'd be rendering thepartialfrom
> >outsidetheRailsroot entirely.
>
> > On Jan 2, 3:42 am, Andrius Chamentauskas  wrote:
>
> > > render :file => ...
>
> > > On Jan 2, 12:32 am, Jeff  wrote:
>
> > > > I have a clientRailsproject, and I'd like to create a folderoutside
> > > > of theRailsapp completely. The client could create vanilla HTML
> > > > files and drop them into the folder. I'd then like to render those
> > > > HTML files as partials against the main site template. I want to keep
> > > > the client as far from the actualRailsapp as possible. Is there a
> > > > way for me to render partials fromoutsidetheRailsroot? Or at least
> > > >outsideviews?
>
> > > > Thanks,
> > > > Jeff
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] How to declare a member for a restful resource when it has a nested resource

2009-01-04 Thread Raj

Currently my routes.rb looks like this.

  map.resources :cities do |cities|
cities.resources :venues, :collection =>  {:transfer => :any}
  end


Now I have a need to declare something like

  map.resources :cities,:collection =>  {:manage => :get}

But since I have a nested resource for cities I am not sure what the
syntax is to declare a collection on cities?

Thanks in advance.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Rails find(:all, :conditions) generates bad SQL?

2009-01-04 Thread srj

Thank you - find_all_by_status is the right way to go here (I should
have thought of that!)

On Jan 3, 12:29 pm, Phlip  wrote:
> > You could also write :conditions => {:status => ACTIVE_STATUSES}
>
> You could also write Model.find_all_by_status(ACTIVE_STATUSES)
>
> So the less you do for Rails, the more opportunities it has to do it right.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: How do booleans work?

2009-01-04 Thread James Byrne

Mike Chai wrote:
> I'm a little confused as to how booleans work in Rails. Which is
> better in the database? boolean or int(1)? True == 1 and False == 0,
> right? Using SQLite, I tried to set a value to true inside the
> database but it gave me an error. MySql didn't, so I had to switch to
> int(1) for it to work. Is this just how it is?

No.  True == anything other than nil or false
False == False

DBMS have their own specific ways of handling booleans.  The DBMS 
adapter handles converting that to a Ruby form.
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@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 render more than one partial?

2009-01-04 Thread Zhao Yi

Hi,

Thanks very much for your explaining. You are right. I can make it more 
simple.

thanks again.

Zhao Yi

-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@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] Plugin not found: ["acts_as_list"]

2009-01-04 Thread Jason Newport

I am trying to install acts_as_list in a rails 2.2.2 project but when I
try the following:  ruby script/plugin install acts_as_list

I get:  Plugin not found: ["acts_as_list"]

I had to download the acts_as_list plugin from the github because it
isn't included in Rails 2.2.2.

The files are in my vendor/plugins/acts_as_list folder so I have:

lib/active_record/acts/list.rb
README
test/list_test.rb
init.rb

What am I doing wrong here?

TIA
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@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] integration test not calling destroy

2009-01-04 Thread Avram Dorfman

Hello,

I'm writing to describe a problem I ran into, and the solution, which  
I've already found, for posterity's sake, b/c it took a very long time  
to figure out. While I don't consider myself a rails newbie, this does  
qualify as a rookie mistake.

I was having an integration test fail because its call to my one of my  
app's destroy controller methods did not appear to be firing. Along  
the way, I tried renaming destroy to destroy2, and that "solved" the  
problem. Except it failed to explain the actual problem.

It turned out that I was mistakenly using 'get' instead of 'post' in  
the integration test to trigger the method.

For those of you that haven't run into this yet, the reason this was a  
problem is that magic line that scaffolding puts into every  
controller, that looks like this:

   verify :method => :post, :only => [ :destroy, :create, :update ],
  :redirect_to => { :action => :list }

This traps non-post HTTP calls to the listed actions, and redirects  
them to a safe action. The purpose of this is to make sure that  
(hopefully) all GET requests are non-destructive. This, as you  
probably do already know, is to make sure that web crawlers (e.g.  
search engines) don't accidentally modify your databases.

In my case, the reason I was using get was that I was equating it to a  
simple hyperlink in one of my templates, rather than a submit button  
on a form. However, the hyperlink in question was *also* generated by  
scaffold, and it (correctly) had :method => :post set, for exactly the  
same reason.

Of course scaffolding can't predict what other destructive methods you  
might write; technically, you ought to add any destructive method to  
this list, and then only call it via a post. I can't wait to find out  
how many places I've failed to do that...

HTH someone...

-Avram

"In the beginning, there was nothing. And God said: 'Let there be  
light!' And then there was still nothing, but you could see it."


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] How do booleans work?

2009-01-04 Thread Mike C

I'm a little confused as to how booleans work in Rails. Which is
better in the database? boolean or int(1)? True == 1 and False == 0,
right? Using SQLite, I tried to set a value to true inside the
database but it gave me an error. MySql didn't, so I had to switch to
int(1) for it to work. Is this just how it is?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Adding routes and link_to

2009-01-04 Thread Sobert

Oh, thanks, it works !

On 4 jan, 22:48, Fernando Perez 
wrote:
> > I've added some routes :
>
> >   map.news 'news', :controller => :News, :action =>:index
>
> >   map.login 'login', :controller => :Login , :action =>:index
>
> This is wrong, it should be:
>
> map.news 'news', :controller => 'news', :action => 'index'
>
> Best regards,
>
> --
> Video tutorial training with screencasts athttp://www.digiprof.fr
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Including join model data

2009-01-04 Thread Tom Lobato


Well, I found a way, but it is not a optimized (rails way) one, since
it executes a find for each "part" record, more some selects.

parts = Evento.find(params[:evento_id]).parts
@treinandos = []
parts.each do |part|
  obj = Treinando.find(part.treinando_id)
  obj[:padrinho] = part.padrinho.nome if part.padrinho_id
  obj[:presenca] = part.presenca
  @treinandos << obj
end

If you have any idea about the rails way to do it, please tell me.



On 4 jan, 19:37, Tom Lobato  wrote:
> I`m using the joing model Part to access Treinando from Evento.
> This code works well:
>
>   �...@treinandos = Evento.find(params[:evento_id]).treinandos
>
> But the parts table has some more columns I need to retrieve
> addtionally.
> Even after some docs/googling and tests I was not able to append this
> information to the resulting object @treinandos.
>
> Can you give some hints about how to do it?
>
> Models:
>
> class Treinando < ActiveRecord::Base
>   has_many :parts
>   has_many :eventos, :through => :parts
> end
> class Part < ActiveRecord::Base
>   belongs_to :treinando
>   belongs_to :evento
> end
> class Evento < ActiveRecord::Base
>   has_many :parts
>   has_many :treinandos, :through => :parts
> end
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Trying to plan out classes/associations for a Rails project

2009-01-04 Thread Chris Hanks

Hello -

I'm something of a newbie to both Ruby and Rails, and the project I've
dreamt up is rather large and unusual, so I'm taking things slowly -
doing tutorials, experimenting on the side, and so on. Now, I'm trying
to figure out what classes I should have for my project, and what their
associations will be, but I'm not sure what would be the most efficient
and practical, so I'm hoping someone can give me a little advice.

The basic concept is that of a set of interrelated wikis. Each user has
their own individual private wiki, and then there's a public wiki that
everyone has access to. All these wikis share a common set of pages, so
a user can be browsing and editing an article on their private wiki, and
use a tab at the top of the screen to flip over to the public wiki to
see what other users have written on the same subject, possibly edit
that (if they feel they have something to contribute) and so on.

In addition, people would be able to create/upload other items to
individual articles on the wiki. These might be images, pdfs, bits of
text, whatever - it's supposed to be flexible, and I plan on building a
list of the possibilities, but I'm not quite there yet. So a few
different people might upload supplementary objects that are then
associated with a specific article (or category of articles) on the
public wiki. Then, users browsing that article may peruse the
supplementary objects uploaded there, and if they see one they like,
they can click a link and import it to their own wiki. Over time, then,
they can amass a collection of supplementary materials that they've
chosen specifically from a common pool, and organize and view them using
the same categories used for the articles.

I know this probably sounds like a big, horrific Rube Goldberg-esque
contraption doomed to failure, which is why it's all the more important
to plan it out in advance in such a way that it won't set my server on
fire or something. So, my question is, what's the best way to set up my
classes and associations and whatnot so that I can keep the database
mangling and trickiness to a minimum?

I don't think that having a single "Entries" table that will contain all
the entries of each individual would be very practical - it seems to
make more sense to me to have those two entries linked by a common id
number across distinct tables. But just creating a table for public
entries and another for private ones doesn't seem like much of an
improvement - the latter would still be obscenely large. If there's a
mechanism through which Rails can create a new entry table on the fly
for each individual user that's created, I haven't heard of it, and that
doesn't sound very plausible either.

Then there's the other objects - to pick one, suppose that I have a
table with the relevant information of all the uploaded images on the
site - their URLs, what articles or categories they're attached to, and
so on. If a user wants to display a list of all the images they've
tagged to appear in their wiki - or more likely, all of the images that
they've tagged that are associated with a certain category of entry -
can a join table be set up to provide that information in a reasonably
efficient manner?

This might all sound like insanity, and maybe it is, but at least it
might give somebody a challenge, hmm? A straight answer would be great,
but if somebody has a link to someplace I can learn more about these
sorts of issues, that would be just as appreciated.

Thanks!
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@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 with installation

2009-01-04 Thread Davo

Are you 100% sure you database/login details are correct in
database.yml
This is what it is pointing to...
Cheers Dave

On Jan 5, 6:48 am, blizzyb  wrote:
> I'm new to ROR and have been trying persistently to resolve a problem.
> My environment is XP SP3, MYSQL 5.0.67.I installed Ruby then RubyGems
> then Rails. I can create apps and everything works except that when I
> go to the root level of my app and type in the cmd - rake db:migrate -
> it says rake aborted! Mysql::Error: Command out of sync; you can't run
> this command now: SHOW TABLES...
>
> I created the app with rails -d mysql myapp. I then went to my config
> folder to put the credentials in the database.yml file. I am
> completely lost why I'm getting this error. In addition, when I do -
> gem install mysql, I get a error that when creating the documentation
> for the gem, it error out.
>
> Any help or suggestion is appreciated. Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Installing RoR for a Newbie is a nightmare

2009-01-04 Thread Davo

Hi Philip,

I think this defeats the purpose - many people including me are using
Rails on Windows and have no problems.
( everything manually installed and using Netbeans IDE )

It should work, it does work.

Personally I find this Windows/Mac comparison elitist.  They can both
co-exist quite happily.
At the end of the day isn't the whole point of developing Web
Applications that it does not matter what O/S the end user is on ?

BTW:  I am a Windows and Mac owner - I do RoR on WIndows because I
find some things annoying on the Mac.

cheers Dave


On Jan 5, 8:32 am, Phlip  wrote:
> Has anyone pointed out the root problem here is Windows?
>
> Install either CygWin or Linux, and spend more time programming and less time
> futzing with the platform!!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Rotating images "AJAX like" on a page

2009-01-04 Thread Chris Stewart

huard.el...@gmail.com wrote:
> if it works in FF3 and Safari, but not in IE7, it's more a javascript
> compatibility issue.
> It's probably better to post this in the jQuery mailing list - a look
> at your code will be required to help you, however.
> 
> On Jan 4, 4:32 am, Chris Stewart 

I'm not so much trying to fix this code as I am trying to find a 
solution using what's provided by Rails out of the box.  Is there one?
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@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 RoR for a Newbie is a nightmare

2009-01-04 Thread Phlip

Has anyone pointed out the root problem here is Windows?

Install either CygWin or Linux, and spend more time programming and less time 
futzing with the platform!!


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Installing RoR for a Newbie is a nightmare

2009-01-04 Thread Conrad Taylor

Hi, I would recommend giving InstantRails another try.  What issue  
were you having InstantRails?

-Conrad

Sent from my iPhone

On Jan 4, 2009, at 1:07 PM, squashua  wrote:

>
> Hi,
> Yes, I tried instant Rails and was unable to get that to work too.
> *sigh
> I found this good tutorial but when I do it I can never get my system
> to recognize Ruby, no matter how many times I reinstall.
> I think I'm going to give up for now. I guess I need someone to sit
> down with me and walk through the install.
> Thanks to all,
> squashua
>
> On Jan 4, 1:52 am, Andrius Chamentauskas  wrote:
>> Have you tried one click installer for 
>> windows?http://rubyforge.org/frs/download.php/47082/ruby186-27_rc2.exe
>> You don't need to install rubygems then, you can simply run cmd and
>> 'gem install 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-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Installing RoR for a Newbie is a nightmare

2009-01-04 Thread Sazima

Rails is largely cmdline driven, you'll have to get used to that.

If I'm not mistaken, Netbeans does a lot of these things for you
through its graphical interface, so you might feel more comfortable
using it. But remeber, unless your host provider is based on Windows
(what I seriously doubt), you'll have to use the cmdline anyway...

Cheers, Sazima

On Jan 3, 9:06 pm, squashua  wrote:
> Sorry, but I still don't understand step 3. You wrote:
>
> "Now, you'll need to add the parent directory ruby.exe and gem.exe to
> your PATH.  For now, you can go to the location gem.exe and perform
> the following to install the current version of rails.
>
> gem install rails
>
> or
>
> gem.exe install rails"
>
> I don't know how to add a parent directory. Do I just drag and drop
> the ruby and rails directories into one larger directory? Do I go to
> the directory, C:\rails\ruby and then run the command(s) you provided?
> Because I get the same error statement. In addition, I don't see
> ruby.exe and gem.exe anywhere, but then I already installed them in
> steps 1 and 2. Didn't I? So why then do I need to reinstall the two
> executables? I think I need more context to know what I'm supposed to
> do. Again, I"m sorry but this step is not as straightforward as more
> experienced programmers may think. : )
>
> -squashua
>
> On Jan 3, 2:23 pm, "Conrad Taylor"  wrote:
>
> > On Sat, Jan 3, 2009 at 2:03 PM, squashua  wrote:
> > > HI Conrad,
>
> > > Unsure if I'm supposed to reply to you or the group or both (shows how
> > > much of a newbie I am). Please let me know if I should just reply to
> > > the group in the future...Here's what I posted to the group:
>
> > Please always post to the group so that others can follow the thread unless
> > someone
> > says otherwise.
>
> > > Thanks Conrad,
>
> > > So, for example.
> > > but
> > > 1.I downloaded Ruby and stored on my C drive
>
> > OK
>
> > > 2.then I downloaded RubyGems. I tried using the command line to
> > > extract Gems (per instructions: ruby setup.rb) but that didn't work. I
> > > seem to have problems with command line btw. No matter, I found the
> > > RubyGems.exe file and ran it by double clicking. Ok so far, I think.
>
> > OK
>
> > > 3. Instructions state to install rails via command line with "gem
> > > install rails" (I'm within the Ruby directory cuz that's where gem is
> > > stored) but I get an error message that says: "gem is not recognized
> > > as an internal or external command, operable program or batch
> > > file"...still no matter (perhaps) because I saw that something already
> > > loaded rails into another directory
> > > ...so to this point the installation is not going according to RoR's
> > > download instructions
>
> > Now, you'll need to add the parent directory ruby.exe and gem.exe to
> > your PATH.  For now, you can go to the location gem.exe and perform
> > the following to install the current version of rails.
>
> > gem install rails
>
> > or
>
> > gem.exe install rails
>
> > > 4. assuming that I have Ruby, RubyGems, and Rails, it appears to me I
> > > should move onto the next step: creating an application skeleton. but
> > > I don't understand what i'm supposed to do with the instructions:
>
> > > rails path/to/your/new/application
>
> > The above command creates a rails application.
>
> > > cd path/to/your/new/application
>
> > The above command changes your current directory to
> > the root of the rails application you created in the previous
> > step.
>
> > > ruby script/server
>
> > The above command starts the web server.
>
> > > What is that command doing? What's my new application? Is there an
> > > example of path/to/your/new/application is supposed to look like or am
> > > I suppsed to type exactly what's above (which doesn't seem right to
> > > me)?
>
> > Please see my above comments.  Also, I would recommend completing
> > the following tutorial starting with step 3.2:
>
> >http://guides.rubyonrails.org/getting_started_with_rails.html
>
> > > ...so that's as far as I've gotten. At this point I don't know if
> > > steps 2 and 3 were successful and I don't feel I'm ready for step 4.
> > > I've found this process confusing and would like to give the site's
> > > content manager some feedback that there could be more helpful
> > > instructions (for me, at least). : )
>
> > > Thanks!
>
> > > Squashua
>
> > > On Jan 3, 3:17 am, "Conrad Taylor"  wrote:
> > > > On Fri, Jan 2, 2009 at 6:46 PM, squashua 
> > > wrote:
>
> > > > > Hi,
>
> > > > > I'm a newbie who's tried over a half dozen times now to install the
> > > > > full Ruby and All-in-One RoR app for my Windows XP machine.
> > > > > Frustratingly, I haven't been able to ever correctly get the programs
> > > > > to load and work. I've tried the RoR site, youtube tutorials, and
> > > > > other assorted websites for an easy to follow and ACCURATE
> > > > > description. Often times the problem is in getting gem to load, or
> > > > > getting the application to work, or other assorted probl

[Rails] Re: Installing RoR for a Newbie is a nightmare

2009-01-04 Thread Sazima

Try Instant Rails, just download & unzip!

Cheers, Sazima

On Jan 3, 12:46 am, squashua  wrote:
> Hi,
>
> I'm a newbie who's tried over a half dozen times now to install the
> full Ruby and All-in-One RoR app for my Windows XP machine.
> Frustratingly, I haven't been able to ever correctly get the programs
> to load and work. I've tried the RoR site, youtube tutorials, and
> other assorted websites for an easy to follow and ACCURATE
> description. Often times the problem is in getting gem to load, or
> getting the application to work, or other assorted problems that a
> newbie like myself might not be able to troubleshoot. I've also tried
> connecting to the RoR community using the IRC but to no avail. Should
> I just quit before ever having really begun? I'm stubborn so I'll
> probably keep at it, but I'd love to hear of any good resources if you
> know of any.
>
> Thanks,
>
> Squashua
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: How? Why? Production Woes

2009-01-04 Thread Fernando Perez

Don't look at the rest of the error message, here is your problem:

> uninitialized constant User::Authentication

I am pretty sure, during development you have mispelled User or 
authentication, and it only appears now when you want to run a migration 
on a fresh server.

Use the grep tool to hunt it down in your code.

--
Video tutorial training by screencasts at http://www.digiprof.fr
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@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 with installation

2009-01-04 Thread blizzyb

I'm new to ROR and have been trying persistently to resolve a problem.
My environment is XP SP3, MYSQL 5.0.67.I installed Ruby then RubyGems
then Rails. I can create apps and everything works except that when I
go to the root level of my app and type in the cmd - rake db:migrate -
it says rake aborted! Mysql::Error: Command out of sync; you can't run
this command now: SHOW TABLES...

I created the app with rails -d mysql myapp. I then went to my config
folder to put the credentials in the database.yml file. I am
completely lost why I'm getting this error. In addition, when I do -
gem install mysql, I get a error that when creating the documentation
for the gem, it error out.

Any help or suggestion is appreciated. Thanks

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Including join model data

2009-01-04 Thread Tom Lobato


I`m using the joing model Part to access Treinando from Evento.
This code works well:

   @treinandos = Evento.find(params[:evento_id]).treinandos

But the parts table has some more columns I need to retrieve
addtionally.
Even after some docs/googling and tests I was not able to append this
information to the resulting object @treinandos.

Can you give some hints about how to do it?

Models:

class Treinando < ActiveRecord::Base
  has_many :parts
  has_many :eventos, :through => :parts
end
class Part < ActiveRecord::Base
  belongs_to :treinando
  belongs_to :evento
end
class Evento < ActiveRecord::Base
  has_many :parts
  has_many :treinandos, :through => :parts
end


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Adding routes and link_to

2009-01-04 Thread Fernando Perez


> I've added some routes :
> 
>   map.news 'news', :controller => :News, :action =>:index
> 
>   map.login 'login', :controller => :Login , :action =>:index
> 

This is wrong, it should be:

map.news 'news', :controller => 'news', :action => 'index'


Best regards,

--
Video tutorial training with screencasts at http://www.digiprof.fr
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@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: storing a static array

2009-01-04 Thread Richard Schneeman

Thanks a bunch for the help, for now its just one array, but sooner or 
later i'm sure I'll want to branch out to your yml solution. Appreciate 
the help!!!
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@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: Rotating images "AJAX like" on a page

2009-01-04 Thread huard.el...@gmail.com

if it works in FF3 and Safari, but not in IE7, it's more a javascript
compatibility issue.
It's probably better to post this in the jQuery mailing list - a look
at your code will be required to help you, however.

On Jan 4, 4:32 am, Chris Stewart 
wrote:
> I'm looking to produce functionality just like what's displayed here
> (http://medienfreunde.com/lab/innerfade/) in the "A list with images and
> links" section.
>
> I downloaded JQuery, included this plugin, and eventually got it to work
> in my Rails app.  However, it only worked on FF3 and Safari, not IE7.
>
> So, does anyone know how I can replicate this using Rails and/or
> supported frameworks?
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: storing a static array

2009-01-04 Thread huard.el...@gmail.com

unless you really want an array, for some reason

On Jan 4, 10:01 pm, Steve Bartholomew  wrote:
> You can also look at using an external configuration file instead of
> constants:http://www.stephenbartholomew.co.uk/2008/8/22/simple-application-wide
> Check out the comments for further ideas.
>
> Steve
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: storing a static array

2009-01-04 Thread huard.el...@gmail.com

you're right, that is cleaner.

On Jan 4, 10:01 pm, Steve Bartholomew  wrote:
> You can also look at using an external configuration file instead of
> constants:http://www.stephenbartholomew.co.uk/2008/8/22/simple-application-wide
> Check out the comments for further ideas.
>
> Steve
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Installing RoR for a Newbie is a nightmare

2009-01-04 Thread squashua

Hi,
Yes, I tried instant Rails and was unable to get that to work too.
*sigh
I found this good tutorial but when I do it I can never get my system
to recognize Ruby, no matter how many times I reinstall.
I think I'm going to give up for now. I guess I need someone to sit
down with me and walk through the install.
Thanks to all,
squashua

On Jan 4, 1:52 am, Andrius Chamentauskas  wrote:
> Have you tried one click installer for 
> windows?http://rubyforge.org/frs/download.php/47082/ruby186-27_rc2.exe
> You don't need to install rubygems then, you can simply run cmd and
> 'gem install 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-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Merb merge: plugins or gems ?

2009-01-04 Thread huard.el...@gmail.com

indeed.  still, i'm curious.

On Jan 4, 9:53 pm, Frederick Cheung 
wrote:
> On 4 Jan 2009, at 19:58, huard.el...@gmail.com wrote:
>
>
>
> > I'm about to write a plugin, but i wonder: is Rails 3 going to have
> > plugins, or is it going to work with gems, like Merb does ?
> > If so, i should look into making it a gem right away ...
> > thx,
>
> You can have plugins that are gems anyway.
>
> Fred
>
> > Elise
> > >
>
>
>  smime.p7s
> 3KViewDownload

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Associations: Am I thinking right?

2009-01-04 Thread Tim

Steve,

That makes perfect sense, I'm new to this but something about the way
I was looking at it didn't seem right, didn't realize you could do
what you did, but it makes perfect sense!!!

Thanks for the quick reply!

On Jan 4, 3:59 pm, Steve Bartholomew  wrote:
> I would ditch the :through association here and have:
>
> Milestone
>   belongs_to :project
>   has_many :tickets
>
> Ticket
>   belongs_to :project
>   belongs_to :milestone
>
> Project
>   has_many :milestones
>   has_many :tickets
>
> This might seem like you're doubling up, but this best represents the
> real world model.  A project has milestones and tickets can belong to
> these milestones.  Tickets may also exist outside of milestones.
>
> With your initial model, you'd need to create tickets in order to
> create milestones - which is not correct.
>
> Hope that makes sense!
>
> Steve
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: storing a static array

2009-01-04 Thread Steve Bartholomew

You can also look at using an external configuration file instead of
constants: 
http://www.stephenbartholomew.co.uk/2008/8/22/simple-application-wide-configuration-in-rails.
Check out the comments for further ideas.

Steve


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Associations: Am I thinking right?

2009-01-04 Thread Steve Bartholomew

I would ditch the :through association here and have:

Milestone
  belongs_to :project
  has_many :tickets

Ticket
  belongs_to :project
  belongs_to :milestone

Project
  has_many :milestones
  has_many :tickets

This might seem like you're doubling up, but this best represents the
real world model.  A project has milestones and tickets can belong to
these milestones.  Tickets may also exist outside of milestones.

With your initial model, you'd need to create tickets in order to
create milestones - which is not correct.

Hope that makes sense!

Steve

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: How? Why? Production Woes

2009-01-04 Thread Robert Head

Jeremy wrote:
> Alright, nevermind.  Apparently for whatever reason the
> restful_authentication plugin directory didn't make it into my git
> repo.  >:-(

I had the same problem.

I probably originally used:
./script/plugin install 
git://github.com/technoweenie/restful-authentication.git

In any case, my restful_authentication folder was there in the project, 
but it's contents for whatever reason were silently never added to the 
repo.
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@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: storing a static array

2009-01-04 Thread huard.el...@gmail.com

Well, if it's not going to change, you make it a constant.
Constants in ruby are in uppercase.
MY_ARRAY =  ['why should', 'I have to copy this', 'every time i want
to use > it']
Normally this should be enough, but if you want to go extra safe you
can freeze it, since an array is an object (http://www.ruby-doc.org/
core/classes/Object.html#M000354).

where to put it in Rails: one option is to declare it in a file in the
lib directory.  Rails loads what is in lib.
To make sure it will never conflict with any other, you could put it
into a module, and call it as
ModuleName::MY_ARRAY

Elise

Richard Schneeman wrote:
> In the spirit of keeping my app DRY, i would like to store an array of
> strings, and call this array in a few views and possibly in my
> controller.
>
> Where is the best place to declare an application wide static variable?
> And is this possible?
>
> array = ['why should', 'I have to copy this', 'every time i want to use
> it']
> --
> Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@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] Associations: Am I thinking right?

2009-01-04 Thread Tim

Hello everyone,

I just read the entire Associations page on the RoR Guide, and I'm
wanting to see if I can run it by the pros to make sure I have it down
right for my particular project.  As a first test project I'm doing a
simple Issue Tracker.

The tracker has the following models:

Projects
Tickets
Milestones
Components
Types
Severities

Each Project will have many Tickets
Each Ticket will have one of the following, Milestone, Component,
Type, Severity

>From reading the RoR Association Guide I have guessed that this is the
best method using Milestone as the example:

Project: has_many: tickets, has_many: milestones, :through => tickets
Ticket: belongs_to: project, belongs_to: milestone
Milestone: has_many: tickets, has_many: projects, :through => tickets

Would this be the correct associations for have a Project will have
multiple tickets, and each ticket will have exactly one milestone
reference?

The thing that has me confused is that each project can have multiple
milestone, ie: Milestone 1, Milestone 2, etc...but these milestones
will be related to the Project, so in the actual table there may be 5
instances of Milestone 1 but with a different project id.

I'm so lost, lol.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Checking for Functional Site

2009-01-04 Thread Andrew Bloom

If you can run a cron script, don't worry about actually doing
something in Ruby or Rails itself. Just write a bash script to check
the output of the 'gem rails' command for the appropriate version
number you use.

On Jan 3, 1:11 pm, Michael Satterwhite  wrote:
> I have my rails sites hosted by Bluehost. While they are in many ways an
> ideal host for developers, they have one very major problem.
>
> Their sysadmins periodically change the Rails installation without any
> warning to users. The result of this is that the sites periodically
> break - and we get no warning that this is going to happen. I don't
> fault them for updating the installation - rails is pretty new
> technology after all. By not letting us know what's happening, however,
> our sites can go down without warning. The only way to determine whether
> or not they've done something is to actually connect to the site and see
> whether or not it is still working. I've complained to them about this
> repeatedly ... their normal response is simply to ignore the complaint.
>
> Is there some way to do an autocheck of the system to see if anything in
> the rails installation / configuration has changed? If there is, I could
> set this up as a cron job and do a manual check when I determined that
> something had changed. This would also minimize the distortion of the
> logs from the hits from my check.
>
> Thanks in advance
> ---Michael
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Merb merge: plugins or gems ?

2009-01-04 Thread Frederick Cheung


On 4 Jan 2009, at 19:58, huard.el...@gmail.com wrote:



I'm about to write a plugin, but i wonder: is Rails 3 going to have
plugins, or is it going to work with gems, like Merb does ?
If so, i should look into making it a gem right away ...
thx,


You can have plugins that are gems anyway.

Fred

Elise
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google  
Groups "Ruby on Rails: Talk" group.

To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---





smime.p7s
Description: S/MIME cryptographic signature


[Rails] storing a static array

2009-01-04 Thread Richard Schneeman

In the spirit of keeping my app DRY, i would like to store an array of
strings, and call this array in a few views and possibly in my
controller.

Where is the best place to declare an application wide static variable?
And is this possible?

array = ['why should', 'I have to copy this', 'every time i want to use
it']
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@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: undefined method `start_form_tag'

2009-01-04 Thread huard.el...@gmail.com

it's a helper that takes a code block
<%= form_tag '/path' do %>
  
<% end %>
check out the API (you can also download a nice version from
http://www.railsbrain.com/


On Jan 4, 7:17 pm, cutegirl  wrote:
> If only "form_tag" is needed, how can one know where is the end of the
> form? Rails seems to evolve so fast that a book from a year ago is
> useless. Where can I get the update info of Rails?  Thanks for help!
>
> On Jan 4, 12:07 pm, Frederick Cheung 
> wrote:
>
> > On 4 Jan 2009, at 16:56, cutegirl wrote:
>
> > > I tried to generate a form using the Rails "start_form_tag", but got
> > > the error message "undefined method `start_form_tag'  for
> > > #". What could be missing here. Thanks for
> > > help.
>
> > start_form_tag was removed from rails over a year ago. Use form_tag  
> > instead.
>
> > Fred
>
> > - Hide quoted text -
>
> > - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: hpricot bug

2009-01-04 Thread Kilian Knoerzer

I solve my problem through nice support by irc channel.

It was the problem of gem hpricot with some of my system. I just had 
delete this hpricot by my folder in my mac system: 
/Users/cellx/.gem/ruby/1.8/gems and delete the "error" package of 
hpricot.

That´s all.

-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@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: Ruby/RoR problem, openssl.so, undefined symbol, update ruby 1.8.7->1.9.1

2009-01-04 Thread 吴乐
ROR is great!
look more informations about how to install rails..see the following
link
http://wiki.rubyonrails.com/rails/pages/HowtosInstallation



On Mon, Jan 5, 2009 at 12:39 AM, jukkai_fi  wrote:

>
> Env: SUSE LINUX 10.1 (X86-64)
>
> with Ruby 1.8.7-p72, RoR
> I can get welcome screen, but after that always get
> Memory Fault
>
> Then I installed current stable
> ruby 1.8.7 (2008-12-29 revision 0) [x86_64-linux]
> ruby: symbol lookup error: /usr/local/lib/ruby/1.8/x86_64-linux/
> openssl.so: undefined symbol: EVP_MD_CTX_md
> I founded some ssl.rb test, it give:
> ruby: symbol lookup error: /usr/local/lib/ruby/1.8/x86_64-linux/
> openssl.so: undefined symbol: EVP_CIPHER_CTX_cipher
>
> I also installed
> http://www.rubyenterpriseedition.com/download.html
> same error
>
> Then installed snapshot
> ruby 1.9.1 (2009-01-04 patchlevel-5000 trunk 21288) [x86_64-linux]
> same problem ...
>
> I'm real newbie with Ruby/RoR, this was my 1st install (trying) to
> create RoR environment.
>
> After this I updated RoR
> gem install -v=2.2.2 rails
>
> Then rest was ...#)&%
>
> rails new
> rails/new>script/server
> /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/lib/
> active_support/dependencies.rb:153:in `require': no such file to load
> -- test/unit/error (MissingSourceFile)
>from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/
> lib/active_support/dependencies.rb:153:in `block in require'
>from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/
> lib/active_support/dependencies.rb:521:in `new_constants_in'
>from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/
> lib/active_support/dependencies.rb:153:in `require'
>from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/
> lib/active_support/deprecation.rb:224:in `'
>from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/
> lib/active_support/dependencies.rb:153:in `require'
>from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/
> lib/active_support/dependencies.rb:153:in `block in require'
>from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/
> lib/active_support/dependencies.rb:521:in `new_constants_in'
>from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/
> lib/active_support/dependencies.rb:153:in `require'
>from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/
> lib/active_support.rb:37:in `'
>from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.2.2/lib/
> commands/server.rb:1:in `require'
>from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.2.2/lib/
> commands/server.rb:1:in `'
>from script/server:3:in `require'
>from script/server:3:in `'
>
>
>
> Somebody said for me that RoR is nice, maybe ? But heavy job put to
> work.
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Merb merge: plugins or gems ?

2009-01-04 Thread huard.el...@gmail.com

I'm about to write a plugin, but i wonder: is Rails 3 going to have
plugins, or is it going to work with gems, like Merb does ?
If so, i should look into making it a gem right away ...
thx,

Elise
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: How to render more than one partial?

2009-01-04 Thread pepe

Hi there.

If I understand well what you need I think you are trying to make
things more complicated than they should be. Forget about your table
rows for a moment and lets look at just text. Let's say that I have to
output the following lines:

This is my line number 1
This is my line number 2
This is my line number 3
This is my line number 4
This is my line number 5


To make things easy I'll say that my program has the following code,
with no loops:

puts 'This is my line number 1'
puts 'This is my line number 2'
puts 'This is my line number 3'
puts 'This is my line number 4'
puts 'This is my line number 5'

Now, if I say that what my program always have to output are lines 1
and 5 and whatever comes in the middle can vary I encapsulate the
inner lines in a method call:

puts 'This is my line number 1'
print_rest_of_lines
puts 'This is my line number 5'

def print_rest_of_lines
  puts 'This is my line number 2'
  puts 'This is my line number 3'
  puts 'This is my line number 4'
end

The result is what I expect, the 5 lines printed in the sequence I
wrote at the beginning.

If you treat your partial the same way as you wold treat the method
call you will produce the same effect.

What I was trying to explain in the previous posting is not that you
render 'your_C_and_D_partial from 'your_A_and_B_partial'. What I was
trying to say is that you can just divide your table rows in as many
(or as little) partials as you need. Just remember that a partial
behaves the same as a method call and you'll understand what you'll
get out of it.

Pepe

On Jan 4, 7:52 am, Zhao Yi  wrote:
> pepe wrote:
> > Another sample based on the original listed above. You cold leave in
> > your page:
> > 
> >   <%= :render :partial => 'your_A_and_B_partial' %>
> > 
> > 
> >   <%= :render :partial => 'your_C_and_D_partial' %>
> > 
>
> > If 'your_A_and_B_partial' delivers:
> >   Text A
> >   Text B
>
> > And 'your_C_and_D_partial' delivers:
> >   Text C
> >   Text D
>
> > You would get the expected results.
> > Pepe
>
> Let's take a look at your example above. How can I render both
> 'your_A_and_B_partial' and 'your_C_and_D_partial'? As you said, I can
> render 'your_C_and_D_partial' in the partial 'your_A_and_B_partial'. But
> how can I do this?
>
> thanks.
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Installing RoR for a Newbie is a nightmare

2009-01-04 Thread Bobnation

I have to echo someone from above, why not try out a Linux distro
instead. Whenever you are going to be deploying your app, it is
probably going onto a box with some distro of Linux on it. I always
like developing on a system as close to my deployment as possible,
which means Ubuntu on my laptop, desktop, and any server I use.

So far, that has been the best for me.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Ruby/RoR problem, openssl.so, undefined symbol, update ruby 1.8.7->1.9.1

2009-01-04 Thread James Byrne

jukkai_fi wrote:
> Env: SUSE LINUX 10.1 (X86-64)
> 
> with Ruby 1.8.7-p72, RoR
> I can get welcome screen, but after that always get
> Memory Fault
> 
> Then I installed current stable
> ruby 1.8.7 (2008-12-29 revision 0) [x86_64-linux]
> ruby: symbol lookup error: /usr/local/lib/ruby/1.8/x86_64-linux/
> openssl.so: undefined symbol: EVP_MD_CTX_md
> I founded some ssl.rb test, it give:
> ruby: symbol lookup error: /usr/local/lib/ruby/1.8/x86_64-linux/
> openssl.so: undefined symbol: EVP_CIPHER_CTX_cipher

Your problem is that the openssl library installed on your system is too 
old.  Update that to the latest version and this problem should go away.
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@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: undefined method `start_form_tag'

2009-01-04 Thread cutegirl

If only "form_tag" is needed, how can one know where is the end of the
form? Rails seems to evolve so fast that a book from a year ago is
useless. Where can I get the update info of Rails?  Thanks for help!

On Jan 4, 12:07 pm, Frederick Cheung 
wrote:
> On 4 Jan 2009, at 16:56, cutegirl wrote:
>
>
>
> > I tried to generate a form using the Rails "start_form_tag", but got
> > the error message "undefined method `start_form_tag'  for
> > #". What could be missing here. Thanks for
> > help.
>
> start_form_tag was removed from rails over a year ago. Use form_tag  
> instead.
>
> Fred
>
>
>
> - Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: undefined method `start_form_tag'

2009-01-04 Thread cutegirl

thanks!

On Jan 4, 12:07 pm, Frederick Cheung 
wrote:
> On 4 Jan 2009, at 16:56, cutegirl wrote:
>
>
>
> > I tried to generate a form using the Rails "start_form_tag", but got
> > the error message "undefined method `start_form_tag'  for
> > #". What could be missing here. Thanks for
> > help.
>
> start_form_tag was removed from rails over a year ago. Use form_tag  
> instead.
>
> Fred
>
>
>
> - Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Ruby/RoR problem, openssl.so, undefined symbol, update ruby 1.8.7->1.9.1

2009-01-04 Thread jukkai_fi

Env: SUSE LINUX 10.1 (X86-64)

with Ruby 1.8.7-p72, RoR
I can get welcome screen, but after that always get
Memory Fault

Then I installed current stable
ruby 1.8.7 (2008-12-29 revision 0) [x86_64-linux]
ruby: symbol lookup error: /usr/local/lib/ruby/1.8/x86_64-linux/
openssl.so: undefined symbol: EVP_MD_CTX_md
I founded some ssl.rb test, it give:
ruby: symbol lookup error: /usr/local/lib/ruby/1.8/x86_64-linux/
openssl.so: undefined symbol: EVP_CIPHER_CTX_cipher

I also installed
http://www.rubyenterpriseedition.com/download.html
same error

Then installed snapshot
ruby 1.9.1 (2009-01-04 patchlevel-5000 trunk 21288) [x86_64-linux]
same problem ...

I'm real newbie with Ruby/RoR, this was my 1st install (trying) to
create RoR environment.

After this I updated RoR
 gem install -v=2.2.2 rails

Then rest was ...#)&%

rails new
rails/new>script/server
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/lib/
active_support/dependencies.rb:153:in `require': no such file to load
-- test/unit/error (MissingSourceFile)
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/
lib/active_support/dependencies.rb:153:in `block in require'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/
lib/active_support/dependencies.rb:521:in `new_constants_in'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/
lib/active_support/dependencies.rb:153:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/
lib/active_support/deprecation.rb:224:in `'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/
lib/active_support/dependencies.rb:153:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/
lib/active_support/dependencies.rb:153:in `block in require'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/
lib/active_support/dependencies.rb:521:in `new_constants_in'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/
lib/active_support/dependencies.rb:153:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.2/
lib/active_support.rb:37:in `'
from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.2.2/lib/
commands/server.rb:1:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.2.2/lib/
commands/server.rb:1:in `'
from script/server:3:in `require'
from script/server:3:in `'



Somebody said for me that RoR is nice, maybe ? But heavy job put to
work.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: undefined method `start_form_tag'

2009-01-04 Thread Frederick Cheung


On 4 Jan 2009, at 16:56, cutegirl wrote:

>
> I tried to generate a form using the Rails "start_form_tag", but got
> the error message "undefined method `start_form_tag'  for
> #". What could be missing here. Thanks for
> help.

start_form_tag was removed from rails over a year ago. Use form_tag  
instead.

Fred
>
> >


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: undefined method `start_form_tag'

2009-01-04 Thread Nilesh Kumar
what is the version of Rails you are using?



On Sun, Jan 4, 2009 at 10:26 PM, cutegirl  wrote:

>
> I tried to generate a form using the Rails "start_form_tag", but got
> the error message "undefined method `start_form_tag'  for
> #". What could be missing here. Thanks for
> help.
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] undefined method `start_form_tag'

2009-01-04 Thread cutegirl

I tried to generate a form using the Rails "start_form_tag", but got
the error message "undefined method `start_form_tag'  for
#". What could be missing here. Thanks for
help.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Using a select list for a boolean field

2009-01-04 Thread tonypm

if you want three values, then boolean true false cant work.  I have
done this using 0 and 1 as below:

= select_tag :drop_ship, options_for_select([['',''],['Drop Ship','1'],
['Not Drop Ship','0']], params[:drop_ship])


You dont say how you want to use the tri-value in your code, but I use
this directly into a named_scope

 has_finder :delisted, lambda {|*args|
  args.first.blank? ? {:conditions=>nil} : {:conditions=>
['obsolete =  ? ', args.first]}

which works fine because i am using mysql with boolean of 0=false,
1=true.

If you are checking the params value in the controller then you will
be looking to detect, blank?, '0' or '1'

Tonypm
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] file_column

2009-01-04 Thread Lecabel

Hi,

I am using file_column insiide my rails app. I am new with programming
and rails.
I am trying to have three uploads inside the same view.
Using file_column only one is correctly stored.
Do you have any possible solution to that?
Thanks

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Table associated problem using belongs_to

2009-01-04 Thread Frederick Cheung


On 4 Jan 2009, at 13:39, Ray Sun wrote:

>
> Frederick Cheung wrote:
>> On 4 Jan 2009, at 08:20, Ray Sun wrote:
>>>
>>> But I cannot find the parameters for belongs_to to set
>>> associated_foreign_key like has_and_belongs_to_many. I don't know
>>> how to
>>> deal with it. Please help. Thanks.
>>
>> There is no such option for belongs_to. In the rails world your
>> packages table would have a user_id column.
>>
>> Fred
>
> Is there any way as workaround to satisfy my requirement? Thanks.

Nothing obvious springs to mind.

Fred

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Calling class methods from included module

2009-01-04 Thread Rasmus Nielsen

Well - I think I now can answer both of my questions myself. In case 
anyone is curious here is what I've learned:

In order to call the serialize method that the two models inherited from 
AR write this:
module MapEvent
  def self.included(base)
base.serialize :command
  end
end

This makes sense as serialize is just an instance method of the models.

And regarding the module/inheritance question I found an answer reading 
these article (including the comments): 
http://bibwild.wordpress.com/2007/04/10/ruby-and-mix-ins-vs-mult-inheritance

Modules should generally speaking be used when you just want to add 
methods to your concrete classes. If you want to add new class or 
instance variables use "normal" inheritance.
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@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 message when installing rails

2009-01-04 Thread cutegirl

It works wonderfully. Thanks again.

On Jan 3, 11:32 pm, "Ethan Gunderson"  wrote:
> Awesome, please post back and let us know how it went!
>
> Ethan Gunderson
>
>
>
> On Sat, Jan 3, 2009 at 10:29 PM, cutegirl  wrote:
>
> > Thanks for the help. I will try the link you provided.
>
> > On Jan 3, 10:41 pm, "Ethan Gunderson"  wrote:
> > > I'm not sure what guide you followed, but this is the one I use for all
> > of
> > > my Windows installs and it seams to work everytime.
>
> > >http://wiki.rubyonrails.org/rails/pages/RailsOnWindows
>
> > > Ethan Gunderson
>
> > > On Sat, Jan 3, 2009 at 9:21 PM, cutegirl  wrote:
>
> > > > Windows XP
>
> > > > On Jan 3, 6:37 pm, "Ethan Gunderson"  wrote:
> > > > > What OS are you trying to install on?
>
> > > > > Ethan Gunderson
>
> > > > > On Sat, Jan 3, 2009 at 1:21 PM, cutegirl  wrote:
>
> > > > > > After I entered the command "gem install rails
> > --include-dependencies"
> > > > > > for a while, an error message "ERROR: while executing gem...
> > > > > > (Zlib::BufError) buffer error". How can I fix this problem? I am
> > new
> > > > > > to rails and I hope I can get some help here. Thanks- Hide quoted
> > text
> > > > -
>
> > > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: How to render more than one partial?

2009-01-04 Thread scott

are you trying to this???

# your main file

  <%= :render :partial => 'A_B_C_D_partial' %>


# A_B_C_D_partial contains
  <%= :render :partial => 'A_B_partial' %>


  <%= :render :partial => 'C_D_partial' %>

# A_B_partial contains and outputs
  Text A
  Text B

# C_D_partial contains and outputs
  Text C
  Text D

# 'A_B_C_D_partial' outputs:
  Text A
  Text B


  Text C
  Text D

# your final combined output

  Text A
  Text B


  Text C
  Text D


On Jan 4, 7:52 am, Zhao Yi  wrote:
> pepe wrote:
> > Another sample based on the original listed above. You cold leave in
> > your page:
> > 
> >   <%= :render :partial => 'your_A_and_B_partial' %>
> > 
> > 
> >   <%= :render :partial => 'your_C_and_D_partial' %>
> > 
>
> > If 'your_A_and_B_partial' delivers:
> >   Text A
> >   Text B
>
> > And 'your_C_and_D_partial' delivers:
> >   Text C
> >   Text D
>
> > You would get the expected results.
> > Pepe
>
> Let's take a look at your example above. How can I render both
> 'your_A_and_B_partial' and 'your_C_and_D_partial'? As you said, I can
> render 'your_C_and_D_partial' in the partial 'your_A_and_B_partial'. But
> how can I do this?
>
> thanks.
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Calling class methods from included module

2009-01-04 Thread Rasmus Nielsen

Hi,

I have these two ActiveRecord models: UserEvent and CoordinateEvent.

The models are extended with the module MapEvent. MapEvent includes some
class methods and some instance methods.

Now, I want both models to use ActiveRecord's serialize
(http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M001984).

My MapEvent looks something like the following. I simply can't figure
where to put "serialize :column_name":

[code]
module MapEvent
  def self.included(base)
base.extend(ClassMethods)
  end

  def a_method
  end

  module ClassMethods
def another_method
end
  end
end
[/code]

How do I call the serialize method from the above context?

An extra question:
Also, it suddenly hit me, that instead of a module I could write
MapEvent as a class that inherits from ActiveRecord instead of a module
- and then let UserEvent and CoordinateEvent inherit from MapEvent?
Would you recommend this? Generally speaking, when should you use
mixins/module and when you use inheritance?

Hope my questions are clear. Thanks in advance!
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@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] hpricot bug

2009-01-04 Thread Kilian Knoerzer

Hello,

how could I solve my problem with hpricot under mac? I searched the same
bug on google, didn´t find it.  Shall I reinstall my hpricot gem from my
system?


k2mac:demo cellx$ script/server
/Users/cellx/.gem/ruby/1.8/gems/hpricot-0.6.164/lib/universal-java1.6/fast_xs.bundle:
[BUG] Bus Error
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9]

Abort trap
k2mac:demo cellx$ gem list

*** LOCAL GEMS ***

actionmailer (2.2.2)
actionpack (2.2.2)
activerecord (2.2.2)
activeresource (2.2.2)
activesupport (2.2.2)
acts_as_ferret (0.4.3)
daemons (1.0.10)
dnssd (0.7.0)
eventmachine (0.12.2)
ferret (0.11.6)
highline (1.5.0)
hpricot (0.6.164)
libxml-ruby (0.9.7)
mechanize (0.9.0)
nokogiri (1.1.0)
ParseTree (3.0.2)
rack (0.4.0)
rails (2.2.2)
rake (0.8.3)
ruby-openid (2.1.2)
ruby2ruby (1.2.1)
rubynode (0.1.5)
sexp_processor (3.0.0)
termios (0.9.4)
k2mac:demo cellx$ uname -a
Darwin k2mac 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST
2008; root:xnu-1228.9.59~1/RELEASE_I386 i386
k2mac:demo cellx$
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@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: Is there any better way to do this?

2009-01-04 Thread Phlip

>  controller.action_name == 'login' %>>

First, move "if controller.controller_name == 'users' && controller.action_name 
== 'login'" into a helper and give it a name, such as login_page_class. It 
should return nil on the wrong page and 'current' on the right page.

Next, use content_tag to build the entire li. Then if :class => 
login_page_class 
contains the nil, the class="" itself will go away in the rendered HTML.

(And put all this under test, because it's logic that you want to keep alive as 
you upgrade this site!)

-- 
   Phlip


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: has_one :through doesn't work in Rails 2.2.2

2009-01-04 Thread 林中鹏
I simply copied the code in that link, and in the associated table there
were only needed fields to establish the relations.

Regards,
林中鹏


On Sun, Jan 4, 2009 at 8:19 PM, Frederick Cheung  wrote:

>
> On 4 Jan 2009, at 08:29, Clive wrote:
>
>
>> I followed the steps in the following link literally in a new Rails
>> 2.2.2 project
>>
>> http://ryandaigle.com/articles/2008/3/24/what-s-new-in-edge-rails-has-one-through
>>
>> Then I ran it in script/console, getting these error (actually I got
>> same error in another big rails project before I read that link):
>>
>
> What's in the classes involved ?
>
>
> Fre
>
>>
>>
>> NoMethodError: undefined method `update_attributes' for #> 0xb7069980>
>>   from /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
>> active_record/base.rb:1833:in `method_missing'
>>   from /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
>> active_record/associations/association_collection.rb:370:in `send'
>>   from /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
>> active_record/associations/association_collection.rb:370:in
>> `method_missing'
>>   from /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
>> active_record/base.rb:2003:in `with_scope'
>>   from /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
>> active_record/associations/association_proxy.rb:202:in `send'
>>   from /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
>> active_record/associations/association_proxy.rb:202:in `with_scope'
>>   from /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
>> active_record/associations/association_collection.rb:366:in
>> `method_missing'
>>   from /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
>> active_record/associations/has_one_through_association.rb:11:in
>> `create_through_record'
>>   from /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
>> active_record/associations.rb:1273:in `magazine='
>>   from (irb):4
>>
>> >>
>>
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Table associated problem using belongs_to

2009-01-04 Thread Ray Sun

Frederick Cheung wrote:
> On 4 Jan 2009, at 08:20, Ray Sun wrote:
>>
>> But I cannot find the parameters for belongs_to to set
>> associated_foreign_key like has_and_belongs_to_many. I don't know  
>> how to
>> deal with it. Please help. Thanks.
> 
> There is no such option for belongs_to. In the rails world your
> packages table would have a user_id column.
> 
> Fred

Is there any way as workaround to satisfy my requirement? Thanks.
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@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: Table associated problem using belongs_to

2009-01-04 Thread Frederick Cheung


On 4 Jan 2009, at 08:20, Ray Sun wrote:
>
> Then I run Package.find(1, :include => :user) in Rails console. From  
> the
> log, I can see the sql is:
>  Package Load Including Associations (0.000309)   SELECT
> `packages`.`id` AS t0_r0, `packages`.`name` AS t0_r1,
> `packages`.`user_name` AS t0_r2, `users`.`id` AS t1_r0, `users`.`name`
> AS t1_r1, `users`.`full_name` AS t1_r2 FROM `packages` LEFT OUTER JOIN
> `users` ON `users`.id = `packages`.user_name WHERE (`packages`.`id`  
> = 1)
>
> But I cannot find the parameters for belongs_to to set
> associated_foreign_key like has_and_belongs_to_many. I don't know  
> how to
> deal with it. Please help. Thanks.

There is no such option for belongs_to. In the rails world your  
packages table would have a user_id column.

Fred
>
> -- 
> Posted via http://www.ruby-forum.com/.
>
> >


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@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: I'm new - Need some serious help

2009-01-04 Thread Conrad Taylor
On Sun, Jan 4, 2009 at 4:19 AM, Frederick Cheung  wrote:

>
>
> On 4 Jan 2009, at 08:22, Ulrich wrote:
>
> >
> > Hi,
> >
> > I'm just starting out to learn Ruby and do web developing as a hobby
> > and then came across Rails.
> >
> > What is it exactly? The explanation on site does not exactly tell me
> > what it is... PHP is a server-side scripting language. Is Rails the
> > same based on Ruby principles or what? I hear Python has a similar
> > thing called Django (but I do not understand these technologies).
> >
> Ruby is a programming language, as is PHP, Scala, Python, brainfuck
> etc...
> Rails is a framework for writing web applications written in ruby
> (just as Django is a web app framework written in python, CakePHP and
> Symphony are PHP frameworks etc...)
>
> > Also, do I need to learn Ruby first in order to proceed with Rails or
> > can I start right off with Rails?
> >
> I would certainly recommend you have a working knowledge of ruby.
>
> Fred
> > >
>

Hi Ulrich, I agree with Fred in regards to having a good working knowledge
of Ruby because it will definitely make your life easier when learning
Rails.

-Conrad

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@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 render more than one partial?

2009-01-04 Thread Zhao Yi

pepe wrote:
> Another sample based on the original listed above. You cold leave in
> your page:
> 
>   <%= :render :partial => 'your_A_and_B_partial' %>
> 
> 
>   <%= :render :partial => 'your_C_and_D_partial' %>
> 
> 
> If 'your_A_and_B_partial' delivers:
>   Text A
>   Text B
> 
> And 'your_C_and_D_partial' delivers:
>   Text C
>   Text D
> 
> You would get the expected results.
> Pepe

Let's take a look at your example above. How can I render both 
'your_A_and_B_partial' and 'your_C_and_D_partial'? As you said, I can 
render 'your_C_and_D_partial' in the partial 'your_A_and_B_partial'. But 
how can I do this?

thanks.
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@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: Create a logging system

2009-01-04 Thread Sobert

Ok, I've finally found this 
http://codingbitch.com/p/comboy/User+authentication+in+Ruby+on+Rails
Adapting this is fine.

On 4 jan, 12:43, Sobert  wrote:
> There's no way of doing it simply ? Because I'm kind of new in Ror,
> and I'd like to work this out with only the basics.
>
> On 4 jan, 12:34, Ryan Bigg  wrote:
>
>
>
> > Use something like 
> > restful_authenticationhttp://github.com/technoweenie/restful_authentication
> > -
> > Ryan Bigg
> > Freelancerhttp://frozenplague.net
>
> > On 04/01/2009, at 8:57 PM, Sobert wrote:
>
> > > Hello.
>
> > > I would like to create a loggin system. I have a players model with
> > > name and passwd. Then, I would like to put the player item in the
> > > session.
>
> > > When I try to loggin, it create a player, so, I'm kind of lost here :
>
> > > login_controller.rb :
>
> > > class LoginController < ApplicationController
> > >  def index
> > >    if request.get?
> > >      session[:current_user]=nil
> > >     �...@player = Player.new
> > >    else
> > >     �...@player = Player.new(params[:player])
> > >      logged_in_user = @Player.try_to_login
> > >      if logged_in_user
> > >        session[:current_user]=logged_in_user
> > >      else
> > >        flash[:notice] = "Utilisateur invalide"
> > >    end
> > >  end
> > >  end
> > > end
>
> > > player.rb
>
> > > class Player < ActiveRecord::Base
> > >  has_one :accessory
> > >  has_many :possessions
> > >  has_many :games, :through =>:possessions, :select =>
> > > "possessions.user_notation, possessions.user_comment, games.*"
>
> > >  def self.login (name, password)
> > >    find(:first, :conditions => ["name = ? and password = ?", name,
> > > password])
> > >  end
>
> > >  def try_to_loggin
> > >    Player.login(self.name, self.password)
> > >  end
>
> > > end
>
> > > index.html.erb in login
>
> > > <% form_for(@Player) do |f| %>
> > > <%= f.error_messages %>
> > >  
> > >    <%= f.text_field :name %>
> > >  
> > >  
> > >    <%= f.text_field :password %>
> > >  
> > >  
> > >  <%= f.submit "Login" %>
> > >    
> > >  <% end %>
>
> > > Any ideas ? Link that can help ? Thanks !- Masquer le texte des messages 
> > > précédents -
>
> > - Afficher le texte des messages précédents -- Masquer le texte des 
> > messages précédents -
>
> - Afficher le texte des messages précédents -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: I'm new - Need some serious help

2009-01-04 Thread Frederick Cheung


On 4 Jan 2009, at 08:22, Ulrich wrote:

>
> Hi,
>
> I'm just starting out to learn Ruby and do web developing as a hobby
> and then came across Rails.
>
> What is it exactly? The explanation on site does not exactly tell me
> what it is... PHP is a server-side scripting language. Is Rails the
> same based on Ruby principles or what? I hear Python has a similar
> thing called Django (but I do not understand these technologies).
>
Ruby is a programming language, as is PHP, Scala, Python, brainfuck  
etc...
Rails is a framework for writing web applications written in ruby  
(just as Django is a web app framework written in python, CakePHP and  
Symphony are PHP frameworks etc...)

> Also, do I need to learn Ruby first in order to proceed with Rails or
> can I start right off with Rails?
>
I would certainly recommend you have a working knowledge of ruby.

Fred
> >


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] I'm new - Need some serious help

2009-01-04 Thread Ulrich

Hi,

I'm just starting out to learn Ruby and do web developing as a hobby
and then came across Rails.

What is it exactly? The explanation on site does not exactly tell me
what it is... PHP is a server-side scripting language. Is Rails the
same based on Ruby principles or what? I hear Python has a similar
thing called Django (but I do not understand these technologies).

Also, do I need to learn Ruby first in order to proceed with Rails or
can I start right off with 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-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] has_one :through doesn't work in Rails 2.2.2

2009-01-04 Thread Clive

I followed the steps in the following link literally in a new Rails
2.2.2 project
http://ryandaigle.com/articles/2008/3/24/what-s-new-in-edge-rails-has-one-through

Then I ran it in script/console, getting these error (actually I got
same error in another big rails project before I read that link):

NoMethodError: undefined method `update_attributes' for #
from /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
active_record/base.rb:1833:in `method_missing'
from /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
active_record/associations/association_collection.rb:370:in `send'
from /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
active_record/associations/association_collection.rb:370:in
`method_missing'
from /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
active_record/base.rb:2003:in `with_scope'
from /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
active_record/associations/association_proxy.rb:202:in `send'
from /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
active_record/associations/association_proxy.rb:202:in `with_scope'
from /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
active_record/associations/association_collection.rb:366:in
`method_missing'
from /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
active_record/associations/has_one_through_association.rb:11:in
`create_through_record'
from /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
active_record/associations.rb:1273:in `magazine='
from (irb):4

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Create a logging system

2009-01-04 Thread Sobert

There's no way of doing it simply ? Because I'm kind of new in Ror,
and I'd like to work this out with only the basics.

On 4 jan, 12:34, Ryan Bigg  wrote:
> Use something like 
> restful_authenticationhttp://github.com/technoweenie/restful_authentication
> -
> Ryan Bigg
> Freelancerhttp://frozenplague.net
>
> On 04/01/2009, at 8:57 PM, Sobert wrote:
>
>
>
>
>
> > Hello.
>
> > I would like to create a loggin system. I have a players model with
> > name and passwd. Then, I would like to put the player item in the
> > session.
>
> > When I try to loggin, it create a player, so, I'm kind of lost here :
>
> > login_controller.rb :
>
> > class LoginController < ApplicationController
> >  def index
> >    if request.get?
> >      session[:current_user]=nil
> >     �...@player = Player.new
> >    else
> >     �...@player = Player.new(params[:player])
> >      logged_in_user = @Player.try_to_login
> >      if logged_in_user
> >        session[:current_user]=logged_in_user
> >      else
> >        flash[:notice] = "Utilisateur invalide"
> >    end
> >  end
> >  end
> > end
>
> > player.rb
>
> > class Player < ActiveRecord::Base
> >  has_one :accessory
> >  has_many :possessions
> >  has_many :games, :through =>:possessions, :select =>
> > "possessions.user_notation, possessions.user_comment, games.*"
>
> >  def self.login (name, password)
> >    find(:first, :conditions => ["name = ? and password = ?", name,
> > password])
> >  end
>
> >  def try_to_loggin
> >    Player.login(self.name, self.password)
> >  end
>
> > end
>
> > index.html.erb in login
>
> > <% form_for(@Player) do |f| %>
> > <%= f.error_messages %>
> >  
> >    <%= f.text_field :name %>
> >  
> >  
> >    <%= f.text_field :password %>
> >  
> >  
> >  <%= f.submit "Login" %>
> >    
> >  <% end %>
>
> > Any ideas ? Link that can help ? Thanks !- Masquer le texte des messages 
> > précédents -
>
> - Afficher le texte des messages précédents -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Adding routes and link_to

2009-01-04 Thread Sobert

Here's the link_to code :

<%= link_to 'News', news_path %>

<%= link_to 'Login', login_path %>

On 4 jan, 12:35, Ryan Bigg  wrote:
> can you show us the code you're using for the link_tos please?
> -
> Ryan Bigg
> Freelancerhttp://frozenplague.net
>
> On 04/01/2009, at 8:49 PM, Sobert wrote:
>
>
>
>
>
> > Hello.
>
> > I've added some routes :
>
> >  map.news 'news', :controller => :News, :action =>:index
>
> >  map.login 'login', :controller => :Login , :action =>:index
>
> > When I go to /news or /login before adding the routes, it works well.
>
> > When I add the routes and clik on the link that goes to /news or /
> > login, I got a 500 internal error with this :
>
> > /!\ FAILSAFE /!\  Sun Jan 04 11:18:54 +0100 2009
> >  Status: 500 Internal Server Error
> >  undefined method `camelize' for :News:Symbol
> >    c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> > action_controller/routing/route_set.rb:388:in `recognize'
> >    c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> > action_controller/dispatcher.rb:182:in `handle_request'
> >    c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> > action_controller/dispatcher.rb:110:in `dispatch_unlocked'
> >    c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> > action_controller/dispatcher.rb:123:in `dispatch'
> >    c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> > action_controller/dispatcher.rb:122:in `synchronize'
> >    c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> > action_controller/dispatcher.rb:122:in `dispatch'
> >    c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> > action_controller/dispatcher.rb:132:in `dispatch_cgi'
> >    c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> > action_controller/dispatcher.rb:39:in `dispatch'
> >    c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../
> > lib/mongrel/rails.rb:76:in `process'
>
> > Any ideas ?
>
> > Thanks !- Masquer le texte des messages précédents -
>
> - Afficher le texte des messages précédents -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Adding routes and link_to

2009-01-04 Thread Ryan Bigg

can you show us the code you're using for the link_tos please?
-
Ryan Bigg
Freelancer
http://frozenplague.net







On 04/01/2009, at 8:49 PM, Sobert wrote:

>
> Hello.
>
> I've added some routes :
>
>  map.news 'news', :controller => :News, :action =>:index
>
>  map.login 'login', :controller => :Login , :action =>:index
>
> When I go to /news or /login before adding the routes, it works well.
>
> When I add the routes and clik on the link that goes to /news or /
> login, I got a 500 internal error with this :
>
> /!\ FAILSAFE /!\  Sun Jan 04 11:18:54 +0100 2009
>  Status: 500 Internal Server Error
>  undefined method `camelize' for :News:Symbol
>c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/routing/route_set.rb:388:in `recognize'
>c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/dispatcher.rb:182:in `handle_request'
>c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/dispatcher.rb:110:in `dispatch_unlocked'
>c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/dispatcher.rb:123:in `dispatch'
>c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/dispatcher.rb:122:in `synchronize'
>c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/dispatcher.rb:122:in `dispatch'
>c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/dispatcher.rb:132:in `dispatch_cgi'
>c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/dispatcher.rb:39:in `dispatch'
>c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../
> lib/mongrel/rails.rb:76:in `process'
>
>
> Any ideas ?
>
> Thanks !
> >


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Create a logging system

2009-01-04 Thread Ryan Bigg

Use something like restful_authentication 
http://github.com/technoweenie/restful_authentication
-
Ryan Bigg
Freelancer
http://frozenplague.net







On 04/01/2009, at 8:57 PM, Sobert wrote:

>
> Hello.
>
> I would like to create a loggin system. I have a players model with
> name and passwd. Then, I would like to put the player item in the
> session.
>
> When I try to loggin, it create a player, so, I'm kind of lost here :
>
> login_controller.rb :
>
> class LoginController < ApplicationController
>  def index
>if request.get?
>  session[:current_user]=nil
>  @Player = Player.new
>else
>  @Player = Player.new(params[:player])
>  logged_in_user = @Player.try_to_login
>  if logged_in_user
>session[:current_user]=logged_in_user
>  else
>flash[:notice] = "Utilisateur invalide"
>end
>  end
>  end
> end
>
>
>
>
> player.rb
>
> class Player < ActiveRecord::Base
>  has_one :accessory
>  has_many :possessions
>  has_many :games, :through =>:possessions, :select =>
> "possessions.user_notation, possessions.user_comment, games.*"
>
>  def self.login (name, password)
>find(:first, :conditions => ["name = ? and password = ?", name,
> password])
>  end
>
>  def try_to_loggin
>Player.login(self.name, self.password)
>  end
>
> end
>
>
> index.html.erb in login
>
> <% form_for(@Player) do |f| %>
> <%= f.error_messages %>
>  
><%= f.text_field :name %>
>  
>  
><%= f.text_field :password %>
>  
>  
>  <%= f.submit "Login" %>
>
>  <% end %>
>
> Any ideas ? Link that can help ? Thanks !
> >


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Installing RoR for a Newbie is a nightmare

2009-01-04 Thread Huw Collingbourne

We do an All in One installer: Ruby, gems, Rails, MySQL and, optionally 
our IDE, Ruby In Steel (either a free or commercial edition), including 
(optionally) a free version of Visual Studio.

http://www.sapphiresteel.com/spip?page=download

best wishes

Huw Collingbourne
SapphireSteel Software
http://www.sapphiresteel.com

-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@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] Create a logging system

2009-01-04 Thread Sobert

Hello.

I would like to create a loggin system. I have a players model with
name and passwd. Then, I would like to put the player item in the
session.

When I try to loggin, it create a player, so, I'm kind of lost here :

login_controller.rb :

class LoginController < ApplicationController
  def index
if request.get?
  session[:current_user]=nil
  @Player = Player.new
else
  @Player = Player.new(params[:player])
  logged_in_user = @Player.try_to_login
  if logged_in_user
session[:current_user]=logged_in_user
  else
flash[:notice] = "Utilisateur invalide"
end
  end
  end
end




player.rb

class Player < ActiveRecord::Base
  has_one :accessory
  has_many :possessions
  has_many :games, :through =>:possessions, :select =>
"possessions.user_notation, possessions.user_comment, games.*"

  def self.login (name, password)
find(:first, :conditions => ["name = ? and password = ?", name,
password])
  end

  def try_to_loggin
Player.login(self.name, self.password)
  end

end


index.html.erb in login

<% form_for(@Player) do |f| %>
 <%= f.error_messages %>
  
<%= f.text_field :name %>
  
  
<%= f.text_field :password %>
  
  
  <%= f.submit "Login" %>

  <% end %>

Any ideas ? Link that can help ? Thanks !
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Adding routes and link_to

2009-01-04 Thread Sobert

Hello.

I've added some routes :

  map.news 'news', :controller => :News, :action =>:index

  map.login 'login', :controller => :Login , :action =>:index

When I go to /news or /login before adding the routes, it works well.

When I add the routes and clik on the link that goes to /news or /
login, I got a 500 internal error with this :

/!\ FAILSAFE /!\  Sun Jan 04 11:18:54 +0100 2009
  Status: 500 Internal Server Error
  undefined method `camelize' for :News:Symbol
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/routing/route_set.rb:388:in `recognize'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/dispatcher.rb:182:in `handle_request'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/dispatcher.rb:110:in `dispatch_unlocked'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/dispatcher.rb:123:in `dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/dispatcher.rb:122:in `synchronize'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/dispatcher.rb:122:in `dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/dispatcher.rb:132:in `dispatch_cgi'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/dispatcher.rb:39:in `dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../
lib/mongrel/rails.rb:76:in `process'


Any ideas ?

Thanks !
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Installing RoR for a Newbie is a nightmare

2009-01-04 Thread Andrius Chamentauskas

Have you tried one click installer for windows?
http://rubyforge.org/frs/download.php/47082/ruby186-27_rc2.exe
You don't need to install rubygems then, you can simply run cmd and
'gem install 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-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Table associated problem using belongs_to

2009-01-04 Thread Ray Sun

I have two tables:
Table [packages]
id  name  user_name
---
1   PK1   Ray
---

Table [users]
id  name  full_name
---
2   Ray   Ray Sun
---

My purpose is to find the full name when I find packages. So I modify
Model Package to:

class Package < ActiveRecord::Base
  belongs_to :user,
 :class_name => "User",
 :foreign_key => "user_name"
end

Then I run Package.find(1, :include => :user) in Rails console. From the
log, I can see the sql is:
  Package Load Including Associations (0.000309)   SELECT
`packages`.`id` AS t0_r0, `packages`.`name` AS t0_r1,
`packages`.`user_name` AS t0_r2, `users`.`id` AS t1_r0, `users`.`name`
AS t1_r1, `users`.`full_name` AS t1_r2 FROM `packages` LEFT OUTER JOIN
`users` ON `users`.id = `packages`.user_name WHERE (`packages`.`id` = 1)

But I cannot find the parameters for belongs_to to set
associated_foreign_key like has_and_belongs_to_many. I don't know how to
deal with it. Please help. Thanks.
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@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 RoR for a Newbie is a nightmare

2009-01-04 Thread Carsten Gehling

BMorearty wrote:

> I think InstantRails is actually a great way to install Ruby and Rails
> on a Windows machine, even though it hasn't been updated since the end
> of 2007. I still use it for Rails development on Windows. You can use
> it to install a working Rails 2.0 system and then upgrade to the
> newest Rails from there.

I totally agree with you. I used InstantRails with the newest Rails 
releases up until july (where I switched to Ubuntu instead of Windows). 
I had no problems with upgrading Rails - so I would still recomment 
InstantRails. I have not seen any other package that is so easy to use.

- Carsten
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@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 RoR for a Newbie is a nightmare

2009-01-04 Thread Tony

I didn't really read through everyone's suggestions but it may be even
more helpful to get a good Linux distro, like Ubuntu. It's fairly easy
to install and that way you won't muck up your Windows installation
either. Plus, there are TONS of tutorials on how to install rails on
Ubuntu or another flavor of Linux. If you have a Mac at your disposal
it would be the trendy way to go too! But, Linux works just as good.
Not to mention, using Linux will force you to become more
knowledgeable about the underlinings of your entire stack (the
software that drives your product). It's definitely a good thing.

Now, learn Ruby.



On Jan 2, 8:46 pm, squashua  wrote:
> Hi,
>
> I'm a newbie who's tried over a half dozen times now to install the
> full Ruby and All-in-One RoR app for my Windows XP machine.
> Frustratingly, I haven't been able to ever correctly get the programs
> to load and work. I've tried the RoR site, youtube tutorials, and
> other assorted websites for an easy to follow and ACCURATE
> description. Often times the problem is in getting gem to load, or
> getting the application to work, or other assorted problems that a
> newbie like myself might not be able to troubleshoot. I've also tried
> connecting to the RoR community using the IRC but to no avail. Should
> I just quit before ever having really begun? I'm stubborn so I'll
> probably keep at it, but I'd love to hear of any good resources if you
> know of any.
>
> Thanks,
>
> Squashua
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---