[Rails] Can't start server, why?

2012-03-01 Thread reynie...@gmail.com
Hi:
I'm trying to run rails server and I get this error:

[root@ruby-devserver config]# rails server
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/execjs-1.3.0/lib/execjs/runtimes.rb:50:in
`autodetect': Could not find a JavaScript runtime. See
https://github.com/sstephenson/execjs for a list of available runtimes.
(ExecJS::RuntimeUnavailable)
from
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/execjs-1.3.0/lib/execjs.rb:5:in
`'
from
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/execjs-1.3.0/lib/execjs.rb:4:in
`'
from
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in
`require'
from
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in
`'
from
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in
`require'
from
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in
`'
from
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in
`require'
from
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in
`'
from
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/bundler-1.0.22/lib/bundler/runtime.rb:68:in
`require'
from
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/bundler-1.0.22/lib/bundler/runtime.rb:68:in
`block (2 levels) in require'
from
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/bundler-1.0.22/lib/bundler/runtime.rb:66:in
`each'
from
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/bundler-1.0.22/lib/bundler/runtime.rb:66:in
`block in require'
from
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/bundler-1.0.22/lib/bundler/runtime.rb:55:in
`each'
from
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/bundler-1.0.22/lib/bundler/runtime.rb:55:in
`require'
from
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/bundler-1.0.22/lib/bundler.rb:122:in
`require'
from /var/www/html/jobapp/config/application.rb:7:in `'
from
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.1/lib/rails/commands.rb:53:in
`require'
from
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.1/lib/rails/commands.rb:53:in
`block in '
from
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.1/lib/rails/commands.rb:50:in
`tap'
from
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.1/lib/rails/commands.rb:50:in
`'
from script/rails:6:in `require'
from script/rails:6:in `'

What is missing there? Why I can't test my application?

Ing. Reynier Pérez Mira
http://reynierpm.site90.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.



Re: [Rails] OT: Why I can't see my email

2012-03-02 Thread reynie...@gmail.com
Yes you're right Google has the result and is the problem itself because
for prevent something it send my messages directly to "All mail" :-( and
there is not way to change it, anyway thanks
Ing. Reynier Pérez Mira
http://reynierpm.site90.com/



On Fri, Mar 2, 2012 at 7:29 AM, Michael Pavling  wrote:

> On 2 March 2012 11:52, ReynierPM  wrote:
> > Hi:
> > I'm having a problem with this list and it's that I can't see my own
> emails
> > and don't know the cause. I check my configuration in Google Groups and
> it
> > says that "Email: send each message to me as it arrives" so any help or
> tip?
> > I just only see the reply from members lists but not my email so when I
> try
> > to follow a thread sometimes I'm lost :(
>
> Good effort by adding OT, but really, wouldn't it be better to find
> the place it is OnTopic for, and ask there?
> FWIW Googling gets lots of results...
> http://lmgtfy.com/?q=Messages+sent+to+mailing+lists+don't+show+in+my+inbox
>
> --
> 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.
>
>

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



Re: [Rails] Can't start server, why?

2012-03-02 Thread reynie...@gmail.com
Ok and thanks now it works fine :)
Ing. Reynier Perez Mira
eMail: reynie...@gmail.com, reynie...@hotmail.com
Skype: reynierpm
Mobile: +58 424.180.5609
Site: http://reynierpm.site90.com


On Fri, Mar 2, 2012 at 9:04 AM, Colin Law  wrote:

> On 2 March 2012 11:46, ReynierPM  wrote:
> >> $ rake environment
> >
> > (in /var/www/html/jobapp)
> > rake aborted!
> >
> > Could not find a JavaScript runtime. See
> > https://github.com/sstephenson/execjs for a list of available runtimes.
> >
> > (See full trace by running task with --trace)
> >
> >
> >> 2) Add the line
> >>
> >>gem 'therubyracer'
> >>
> >> to your Gemfile
> >
> > I've stopped here because I'm starting with Ruby and RoR and not know
> what
> > you mean. Could you explain me a bit? Sorry for my ignorance but I'm just
> > learning
>
> In the top level folder of your rails project you will find a file
> Gemfile.  Add the line gem 'therubyracer' to that (in fact I think you
> may find it there already, but commented out, and then run bundle
> install.
>
> Of course you could have found this out with a bit of googling.
>
> Colin
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-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.
>
>

-- 
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] Starting my first application with Rails

2012-03-02 Thread reynie...@gmail.com
Hi:
I'm starting a simple application to learn Rails and Ruby of course. I come
from PHP and frameworks like Symfony, CakePHP and CodeIgniter and some of
them have a task to create DB models from existent database which is my
case. I have a PostgreSQL database which want to use in my app. My question
is: exists any rake or rails command to generate models if they exists in
Rails?

Ing. Reynier Perez Mira
eMail: reynie...@gmail.com, reynie...@hotmail.com
Skype: reynierpm
Mobile: +58 424.180.5609
Site: http://reynierpm.site90.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.



Re: [Rails] Starting my first application with Rails

2012-03-02 Thread reynie...@gmail.com
Thanks Javier and what about ID (PK) fields? Need to be specified too or
Rails is smart enough to get them from tables?

Ing. Reynier Perez Mira
eMail: reynie...@gmail.com, reynie...@hotmail.com
Skype: reynierpm
Mobile: +58 424.180.5609
Site: http://reynierpm.site90.com


On Fri, Mar 2, 2012 at 11:06 AM, Javier Quarite  wrote:

>
>
> On Fri, Mar 2, 2012 at 10:33 AM, reynie...@gmail.com 
> wrote:
>
>> Hi:
>> I'm starting a simple application to learn Rails and Ruby of course. I
>> come from PHP and frameworks like Symfony, CakePHP and CodeIgniter and some
>> of them have a task to create DB models from existent database which is my
>> case. I have a PostgreSQL database which want to use in my app. My question
>> is: exists any rake or rails command to generate models if they exists in
>> Rails?
>>
>> Ing. Reynier Perez Mira
>> eMail: reynie...@gmail.com, reynie...@hotmail.com
>> Skype: reynierpm
>> Mobile: +58 424.180.5609
>> Site: http://reynierpm.site90.com
>>
>
>
> A model can be generated using
>
> rails generate model MODELNAME  field1:type field2:type .
>
>
>
> Javier Q.
>
>  --
> 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.
>

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



Re: [Rails] Starting my first application with Rails

2012-03-02 Thread reynie...@gmail.com
Also can my tables be named in singular or all needs to be plural? I'm
reading conventions right now but have this doubt. For example if I have a
table called record the correct name for the model could be Record <<
ActiveRecord::Base?
Ing. Reynier Perez Mira
eMail: reynie...@gmail.com, reynie...@hotmail.com
Skype: reynierpm
Mobile: +58 424.180.5609
Site: http://reynierpm.site90.com


On Fri, Mar 2, 2012 at 11:09 AM, reynie...@gmail.com wrote:

> Thanks Javier and what about ID (PK) fields? Need to be specified too or
> Rails is smart enough to get them from tables?
>
> Ing. Reynier Perez Mira
> eMail: reynie...@gmail.com, reynie...@hotmail.com
> Skype: reynierpm
> Mobile: +58 424.180.5609
> Site: http://reynierpm.site90.com
>
>
> On Fri, Mar 2, 2012 at 11:06 AM, Javier Quarite wrote:
>
>>
>>
>> On Fri, Mar 2, 2012 at 10:33 AM, reynie...@gmail.com > > wrote:
>>
>>> Hi:
>>> I'm starting a simple application to learn Rails and Ruby of course. I
>>> come from PHP and frameworks like Symfony, CakePHP and CodeIgniter and some
>>> of them have a task to create DB models from existent database which is my
>>> case. I have a PostgreSQL database which want to use in my app. My question
>>> is: exists any rake or rails command to generate models if they exists in
>>> Rails?
>>>
>>> Ing. Reynier Perez Mira
>>> eMail: reynie...@gmail.com, reynie...@hotmail.com
>>> Skype: reynierpm
>>> Mobile: +58 424.180.5609
>>> Site: http://reynierpm.site90.com
>>>
>>
>>
>> A model can be generated using
>>
>> rails generate model MODELNAME  field1:type field2:type .
>>
>>
>>
>> Javier Q.
>>
>>  --
>> 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.
>>
>
>

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



Re: [Rails] Starting my first application with Rails

2012-03-02 Thread reynie...@gmail.com
@Javier: Thanks for your clarifications it's a bit clear to me now
@Colin: I can do that without problem because I'm starting the application
so maybe I could create models from scratch using Rails but what about
fixtures? I've a table country and will be nice if I can populate the table
with 238 records :)
@Walter: Understood but what about relations? How to deal with this from
rails command line? I have relations BelongsTo (record belongs to country)
and hasMany (record hasMany attachment and some others)

Thanks to every
Ing. Reynier Perez Mira
eMail: reynie...@gmail.com, reynie...@hotmail.com
Skype: reynierpm
Mobile: +58 424.180.5609
Site: http://reynierpm.site90.com


On Fri, Mar 2, 2012 at 11:17 AM, Walter Lee Davis wrote:

>
> On Mar 2, 2012, at 10:41 AM, reynie...@gmail.com wrote:
>
> > Also can my tables be named in singular or all needs to be plural? I'm
> reading conventions right now but have this doubt. For example if I have a
> table called record the correct name for the model could be Record <<
> ActiveRecord::Base?
>
> You can certainly override the conventions, but it's going to be messy.
> Particularly if you do something like tell Rails that the plural of record
> is record. The conventions are there to remove needless configuration.
>
> Walter
>
> > Ing. Reynier Perez Mira
> > eMail: reynie...@gmail.com, reynie...@hotmail.com
> > Skype: reynierpm
> > Mobile: +58 424.180.5609
> > Site: http://reynierpm.site90.com
> >
> >
> > On Fri, Mar 2, 2012 at 11:09 AM, reynie...@gmail.com <
> reynie...@gmail.com> wrote:
> > Thanks Javier and what about ID (PK) fields? Need to be specified too or
> Rails is smart enough to get them from tables?
> >
> > Ing. Reynier Perez Mira
> > eMail: reynie...@gmail.com, reynie...@hotmail.com
> > Skype: reynierpm
> > Mobile: +58 424.180.5609
> > Site: http://reynierpm.site90.com
> >
> >
> > On Fri, Mar 2, 2012 at 11:06 AM, Javier Quarite 
> wrote:
> >
> >
> > On Fri, Mar 2, 2012 at 10:33 AM, reynie...@gmail.com <
> reynie...@gmail.com> wrote:
> > Hi:
> > I'm starting a simple application to learn Rails and Ruby of course. I
> come from PHP and frameworks like Symfony, CakePHP and CodeIgniter and some
> of them have a task to create DB models from existent database which is my
> case. I have a PostgreSQL database which want to use in my app. My question
> is: exists any rake or rails command to generate models if they exists in
> Rails?
> >
> > Ing. Reynier Perez Mira
> > eMail: reynie...@gmail.com, reynie...@hotmail.com
> > Skype: reynierpm
> > Mobile: +58 424.180.5609
> > Site: http://reynierpm.site90.com
> >
> >
> > A model can be generated using
> >
> > rails generate model MODELNAME  field1:type field2:type .
> >
> >
> >
> > Javier Q.
> >
> >
> > --
> > 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.
> >
> >
> >
> > --
> > 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.
>
> --
> 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.
>
>

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