Re: [Rails] Re: ROR + React

2019-08-19 Thread Noel
There are at least 4 different ways that I'm familiar with and tons of 
resources to help you execute the way that works best for you. Here's the 
ones I've learned from researching:

1. Approach 1 - CDN based inclusion in header

- You can include it just as a link on the html pages you want to include 
some React functionality. This is as simple as putting it in the header of 
the pages. 

2. Approach 2 - React Front-end/Rails API backend (pre-existing app)

- Convert controllers into API folders with namespacing technique and 
create the front-end `client` as shown in Approach 3.

3. Approach 3 - React Front-end/Rails API backend 

- This approach works by creating a rails api 
rails new myapp --api

- Within the directory of the app run
create-react-app client

- Install foreman gem, create Procfile with the following:
RAILS: bundle exec rails s -p 3001
REACT: cd client && npm start
* (caveat: If deployed on Heroku, **you may need to change `REACT` to 
`web`.)*

- Run servers by
foreman start

- You will need something like axios in node to make the front-end `client` 
talk to the rails backend but this works. 

4. Approach 4 -React-rails gem install
- This approach, I cannot speak to because it seemed the most  coupled. 
In the back of my mind, I tend to think this couples react to rails in a 
way I, at this level of my knowledge, would not be able to decouple if I 
were to revert to something else or use Vue or stick to normal html 
requests. 

Forgive me giving my opinion on that last one, if someone has more insight 
on the gem approach, I'd be happy to hear it. 



On Monday, August 19, 2019 at 2:14:36 PM UTC-5, Stephen Blackstone wrote:
>
> You likely just want —webpack=react if using rails 5.1 or higher
> Sent from my iPhone
>
> On Aug 19, 2019, at 2:54 PM, Joe Guerra  > wrote:
>
> I guess this is what I'm looking for?
>
> https://github.com/reactjs/react-rails
>
> On Monday, August 19, 2019 at 2:48:03 PM UTC-4, Joe Guerra wrote:
>>
>> I'm going to rebuild my rails app and maybe add react on the front end.  
>>   I forget which version of rails I'm using, but I guess it would be best 
>> to start over with the latest.
>>
>> Does anyone know of boilerplate or template that would include starting 
>> an app with the react & rails?  (maybe some other useful gems as well)
>>
>> Thanks,
>> Joe
>>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to rubyonra...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/rubyonrails-talk/e66ae529-9607-4952-9798-cc229591f9bd%40googlegroups.com
>  
> 
> .
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/774f99b0-1647-432f-855b-3d0079ab15ff%40googlegroups.com.


Re: [Rails] Basics: How does Javascript communicate with Ruby on Rails?

2019-08-13 Thread Noel
Hey Jason,
Thank you for the book recommendation, a good addition to what I have 
so far with books on Rails and Ruby. I have gone through many of the 
sections of the Rails guide and the edge version. The drill down that 
approach that Walter described is something I'm doing, but now I'm just 
trying to find the point of origin with each gem/module. So much magic, 
hard to tell when you hit paydirt. As for Ruby itself, I've explored it 
regularly for a while now, just feel like it sticks when I need to use the 
information. Thank you again for the recommendations, much obliged.

On Monday, August 12, 2019 at 10:05:58 AM UTC-5, te...@datatravels.com 
wrote:
>
>
> I think perhaps one of the things you may be up against is that this 
> learning curve is actually very out-dated now. 
>
> It's an old book, but this was one of the most popular books from 
> 2007-2009 when a lot of us were learning the basics of Rails you are asking 
> about  here. 
>
>
> https://www.thriftbooks.com/w/agile-web-development-with-rails-a-pragmatic-guide_dave-thomas_david-heinemeier-hansson/313251/?mkwid=sHKLUDuV1%7cdc=7011290083221329340912=pla-293510751240=CjwKCAjwnMTqBRAzEiwAEF3ndnLhRREJENrkPly581-PMj-QFOLuzmC2IBUYrUtYbVHYpfSeM3hqCRoCalUQAvD_BwE#isbn=097669400X=2753678
>  
>
> It might reference some things in older version of Rails but the basics of 
> what you are asking are thoroughly covered in the MVC pattern. 
>
> The Rails documentation can be difficult, but have you been through the 
> Rails Guides? I would recommend working your way through the Rails Guides 
> one by one and typing out the examples in your editor to learn what each 
> piece of code does. 
>
> You're right, developers can write docs with too many assumptions and not 
> enough explanation. But nothing substitutes good old fashioned trial & 
> error. 
>
>
> Finally, I would strongly recommend you start with a solid foundation of 
> Ruby, as I know many people who tried to learn Rails before Ruby and got 
> lost. 
>
> Good luck 
>
>
> Jason 
>
>
>
> > On Aug 7, 2019, at 10:15 PM, Noel > 
> wrote: 
> > 
> > You just hit everything that I was trying to figure out and then some. 
> This is what I’ve been needing to know(I can’t be certain of the that). 
> Last question, how did you figure that out?; because that’s where this is 
> kind of embarrassing, that I’ve held out to ask this for so long for fear. 
> I’m sure intuition and experience comes with understanding what’s under the 
> hood, but how does a junior dev figure stuff out like this? Please be 
> merciful, don’t say look at the documentation, the documentation needs 
> documentation. The documentation is not very clear for a junior dev because 
> some stuff is abstracted and it’s like you have to be in the know about 
> some other concept(that is omitted because reasons) that isn’t mentioned 
> but understood. 
> > 
> > Goes without saying but thanks man, this is solid knowledge I can use. 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "Ruby on Rails: Talk" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to rubyonra...@googlegroups.com . 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/rubyonrails-talk/cec8887e-7b38-4feb-b403-ef2810038a84%40googlegroups.com.
>  
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/a9244437-184c-4b73-ac77-595f3730ac39%40googlegroups.com.


Re: [Rails] Basics: How does Javascript communicate with Ruby on Rails?

2019-08-07 Thread Noel
You just hit everything that I was trying to figure out and then some. This is 
what I’ve been needing to know(I can’t be certain of the that). Last question, 
how did you figure that out?; because that’s where this is kind of 
embarrassing, that I’ve held out to ask this for so long for fear. I’m sure 
intuition and experience comes with understanding what’s under the hood, but 
how does a junior dev figure stuff out like this? Please be merciful, don’t say 
look at the documentation, the documentation needs documentation. The 
documentation is not very clear for a junior dev because some stuff is 
abstracted and it’s like you have to be in the know about some other 
concept(that is omitted because reasons) that isn’t mentioned but understood.

Goes without saying but thanks man, this is solid knowledge I can use. 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/cec8887e-7b38-4feb-b403-ef2810038a84%40googlegroups.com.


Re: [Rails] Basics: How does Javascript communicate with Ruby on Rails?

2019-08-07 Thread Noel
Genuinely, I thank both of you for your insights. Without stretching this 
thread out any more, I want to figure out one last concept. 

Form data, based on what was mentioned above, is it that the headers dictate 
what is passed on as data to be persisted? Like where in the chain of events 
does the SQL know that this is the data to be persisted? I think that’s where I 
get foggy, I understand the concepts of the http request/response but at what 
point is the data from a form understood or decided or interpreted by SQL? 
That’s all in the adapter?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/03b39e95-71af-4e6e-9f14-78047c70f74e%40googlegroups.com.


[Rails] Basics: How does Javascript communicate with Ruby on Rails?

2019-08-06 Thread Noel
Hello to All,
 I'm trying to understand something that I seem to get lost on, which 
is how exactly does Javascript communicate with Rails? I understand how to 
make it work, I can even make a React front-end and Rails API work 
together. But I feel like I am missing something fundamental when it comes 
to how this communication actually occurs. If you know if a resource that 
explains this, I would be grateful.

Also, how does SQL communicate with Ruby or viceversa? A good resource that 
breaks it down would be great.


-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/dffe00e4-61d1-46a4-8123-34d631a6148b%40googlegroups.com.


Re: [Rails] RoR integration with Siteminder?

2013-08-25 Thread Noel
At my company I have it set up via an apache module which intercepts every 
request for authentication and it redirects back with headers like SM_USER 

Sent from my iPhone

On Aug 24, 2013, at 3:35 PM, Les Hartzman lhartz...@gmail.com wrote:

 Hello,
 
 I'm new to RoR and am wondering what has to be done to incorporate SSO with 
 Siteminder with a web application?
 
 I know that with Spring there is a built-in ability to connect security with 
 Siteminder, so I'd like to know how RoR deals with security and Siteminder.
 
 TIA,
 
 Les
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Ruby on Rails: Talk group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to rubyonrails-talk+unsubscr...@googlegroups.com.
 To post to this group, send email to rubyonrails-talk@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/rubyonrails-talk/e813a75d-f46c-4206-b43b-4eedcad2fce0%40googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups Ruby 
on Rails: Talk group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/9D910822-7BE2-4F6D-829A-D0F09709F31E%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Rails] New in town

2012-10-05 Thread Noel
On Thu, Oct 4, 2012 at 2:52 PM, Richard McKenna
richarddmcke...@gmail.com wrote:
 Hi all,

 I'm just stepping into the what seems the wonderful world of Ruby/Rails and
 was just looking for some recommendations for reading materials, resources
 etc.

 I am currently watching the Ruby Essential Training and Ruby on Rails 3
 Essential Training over at lynda.com which so far seem pretty good for
 getting me started.

 So if anyone can recommend good books, resource sites, personal blogs with
 good tutorials or anything they think I might find useful while starting
 out, I'd be eternally great-full.

This is a great resource
http://ruby.railstutorial.org/




 I do have several years web development experience so I'm not a total a
 total newcomer just never used Ruby before.

 Thanks,

 Richard


-- 
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 https://groups.google.com/groups/opt_out.




[Rails] redirect_to flash

2012-03-07 Thread Noel
I am trying to understand why redirect_to only accepts :notice and :alert

https://github.com/rails/rails/blob/ead93c5be5b0f1945b7d0302f1aae4685ee3f2fb/actionpack/lib/action_controller/metal/flash.rb#L12

Is there any reason I may be missing to not allow something like
:success like this:

redirect_to suppliers_path, :success = 'Supplier was successfully created.' }

- Noel

-- 
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] Charset encoding issue

2012-03-07 Thread Noel
I am working with an SQL Server database on a windows server with collation
SQL_Latin1_General_CP1_CI_AS

When I go to the rails console on the Linux server with the app I get
= Rodríguez, César

To try to isolate the problem in my controller I tried render :text =

but on the browser I am seeing

Rodr?guez, C?sar

I believe this is an encoding issue, but I don't know how to
resolve.(and Google + Stackoverflow are failing me)  Given that the
source data can't be changed, what do I need to do on the rails side
to get the text to render properly?

On Chrome I have tried to manually change the encoding and no matter
which I select I can't get the text to render correctly.

Also, why would it render correctly on the console?

Thanks,
Noel

-- 
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] Re: redirect_to flash

2012-03-07 Thread Noel
On Wed, Mar 7, 2012 at 10:56 AM, Tim Shaffer timshaf...@me.com wrote:
 I believe those two are just the most common.

 Look at the rest of the code, though. It looks like you can specify other
 flash values like so:

 redirect_to suppliers_path, :flash = { :success = 'Supplier was
 successfully created.' }


Thanks Tim, I didn't get that from the code.

When I used redirect_to I was expecting
   redirect_to suppliers_path, :whatever
would produce flash[:whatever]

At least this is a good workaround for me.

- Noel

-- 
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] Gemfile.local along with Gemfile?

2012-02-18 Thread Noel
On Sat, Feb 18, 2012 at 9:51 AM, Danimal fightonfightw...@gmail.com wrote:
 Hi all!

 I'm wondering if there is any elegant way to have some gems locally in
 a rails 3.2 + ruby 1.9 project but not have them in the Gemfile and
 therefore not in source control.

 The reason is very similar to this:

 http://stackoverflow.com/questions/3752906/how-to-use-a-gem-in-rails-3-without-referencing-it-in-the-gemfile

 I work on a large team and we moved to Ruby 1.9.3 but ruby-debug19
 doesn't work with 1.9.3 unless you do some weird stuff. I got it to
 work, but it totally taints the Gemfile (references RVM paths). Plus,
 some people on the team don't use or want to use ruby-debug. It occurs
 to me that this is probably a bigger problem than my issue.

 Specifically: with bundler, is there some way to have project gems AND
 local gems, where the local gems aren't part of the project?

 In my case, I'd then be able to have ruby-debug hacked and configured
 for my local development, but it wouldn't be in the Gemfile and thus
 wouldn't mess up the other devs.

 Thoughts?


What about defining a constant in an initializer that is not checked
in then do something like what is shown in the bundler section here:

https://github.com/bbatsov/rails-style-guide



 -Danimal

 --
 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] learning Ruby and rails

2012-02-16 Thread Noel
On Tue, Feb 14, 2012 at 4:01 PM, Jeff Kyzer kyzer...@gmail.com wrote:
 Hello

 So i am trying to learn Ruby and Rails.  My biggest problem right now
 is my platform.

 Any good setup for ruby on rails for windows?  or would it just be
 easier to put unix/lynics on my computer.

 My other question is about learning Rails.  I have a couple of books,
 but I am looking for a college class or some videos.


start here you will find answer to both questions
http://ruby.railstutorial.org/ruby-on-rails-tutorial-book?version=3.2

 If these questions have already been answered, please just post me the
 link.

 Thank you

 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.


-- 
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] Experiences using Database.com with Ruby on Rails

2012-02-13 Thread Noel
On Mon, Feb 13, 2012 at 9:47 AM, Andrew misbehav...@gmail.com wrote:
 Hello,

 My boss is really pushing us to switch to using Database.com for our
 database. He seems to think it's the solution to every problem we've never
 had. I've never worked with it before, so I don't know how it compares to
 using plain, old, ActiveRecord. I'm hoping to get some candid feedback from
 any Ruby developers who have used this before. Do you think it's worth it to
 switch from using a standard database (i.e. MySQL, Postgres, MongoDB).


did you see this
http://stackoverflow.com/questions/5967486/any-apex-salesforce-com-database-com-advantages-over-ruby-on-rails


 Thanks,
 Andrew


-- 
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] Issue while deploying to heroku with Rails 3.2.1, ruby 1.9.3-p0, using twitter/bootstrap.

2012-02-09 Thread Noel
On Thu, Feb 9, 2012 at 7:59 PM, Manoj W. li...@ruby-forum.com wrote:
 Hi,

 I am new to Rails and am following Rails tutorials by Michael Hartl and
 Rails guides. I have deployed an app to Heroku, but I get this error
 while trying to access it (from heroku logs) -

 Completed 500 Internal Server Error in 75ms
 ActionView::Template::Error (application.css isn't precompiled):
 %= stylesheet_link_tag    application, :media = all %


have you tried
rake assets:precompile


 I have used twiiter/bootstrap and have followed instructions on
 https://github.com/seyhunak/twitter-bootstrap-rails

 Here are the contents of my gemfile -
 gem 'rails', '3.2.1'

 # Bundle edge Rails instead:
 # gem 'rails', :git = 'git://github.com/rails/rails.git'

 group :development, :test do
  gem 'sqlite3'
  gem 'heroku'
  gem 'rspec-rails'
  gem 'twitter-bootstrap-rails'
  gem 'annotate', '~ 2.4.1.beta1'
 end

 group :test do
  gem 'webrat', '0.7.1'
 end

 group :production do
  gem 'pg'
 end

 # Gems used only for assets and not required
 # in production environments by default.
 group :assets do
  gem 'sass-rails',   '~ 3.2.3'
  gem 'coffee-rails', '~ 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported
 runtimes
  gem 'therubyracer'

  gem 'uglifier', '= 1.0.3'
 end

 gem 'jquery-rails'

 However the thing I don't understand is that I don't see any bootstrap
 related css or js files in my /vendor/assets /javascripts or
 /stylesheets dirs. I have bootstrap.js.coffee and bootstrap.css.less in
 my /app/assets /javascripts and /stylesheets dirs respectively.

 I am able to run the app. locally but it gives me the above error on
 heroku.

 Please help me with this issue.

 Thanks in advance,
 Manoj.

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


-- 
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] Re: Create new Rails with mysql default on database.yml

2012-01-22 Thread Noel
In 3.2 you can define .railsrc with custom command line options that will 
always apply to rails new

Sent from my iPhone

On Jan 22, 2012, at 8:01 PM, Norm Scherer normsche...@earthlink.net wrote:

 On 01/22/2012 06:16 PM, Felipe Pieretti Umpierre wrote:
 
 Ok, but how I can make the mysql be default ?
 
 To make mysql the default when you run rails new you would have to modify the 
 rails code somewhere (If you cannot figure out where on your own you should 
 not try to modify it).  To change the database driver used on this particular 
 instance modify config/database.yml.  Run rails new xx -d mysql to see what 
 the values in that file should be. 
 -- 
 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] Ejecutar accion automaticamente

2011-11-18 Thread Felix Noel Abelardo
Hola a todos, me gustaria saber de que forma puedo ejecutar el codigo
que tengo en una accion de forma automatica.
Me explico mejor:
Yo tengo un codigo que actualiza tablas de una base de datos con datos
de otra, eso lo tengo hecho en Ruby on Rails con una accion de una vista
pero me gustaria saber como ejecutarlo por ejemplo todos los dias a la
12:00 AM, para que se mantengan actualizadas las tablas con los datos de
las otras sin tener que abrir la aplicacion y ejecutar la accion.

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



Re: [Rails] Re: Generate model from database

2011-10-20 Thread Noel
On Thu, Oct 20, 2011 at 8:20 AM, genterminl
ostrof...@users.sourceforge.net wrote:
 Tim,

 Thanks.  That looks like exactly what I need to get started.  I'm simply not
 familiar enough yet with ruby or rails to have come up with that from
 scratch myself, but I can certainly use it and modify it to handle the
 naming conventions in my existing schema.  Now I have to go back to working
 on updating Dr. Nic's magic_model_generator to work with rails 3.

this gem might also have things you can use
https://github.com/amatsuda/hocus_pocus


 --
 You received this message because you are subscribed to the Google Groups
 Ruby on Rails: Talk group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/rubyonrails-talk/-/C6b9xZ_D5rsJ.
 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] Re: formtastic / activeadmin

2011-10-11 Thread Noel Hwande
Remco Swoany wrote in post #1025137:

 tried this:

 f.inputs Appartment Details do
   f.input :assets do |asset_fields|
   asset_fields.file_field.input :asset, :as = :file
  end
 end

 there is no upload button available. What i am doing wrong?

 Grtz..Swoany

Hi, were you able to solve this? I'm having the same issue.

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



Re: [Rails] network of volunteer rubists for humanitarian projects

2011-09-26 Thread Noel
Railsbridge had a project/site for this. Not sure if they r still active. 

Sent from my iPhone

On Sep 26, 2011, at 5:00 AM, Nicolas M. li...@ruby-forum.com wrote:

 Hi,
 Do you know the existence of networks of volunteers in the ruby on rails
 community willing to be involved or being consulted sometime for
 humanitarian projects? (I saw a website about that a long time ago , but
 I don't remember its name)
 Thanks!
 Nicolas
 
 -- 
 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.
 

-- 
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] help me, I can't run

2011-09-13 Thread Noel
have u tried the latest railsinstaller?

On Tue, Sep 13, 2011 at 4:27 AM, Lee sorlo...@gmail.com wrote:
 Hi, I installed railsinstaller.

 and ...

rails s

 TCPServer Error: Permission denied - bind(2)
 Exiting
 C:/RailsInstaller/Ruby1.8.7/lib/ruby/1.8/webrick/utils.rb:73:in
 'initailize':permission denied - bind(2) (Errno::EACCES)
        from C:/RailsInstaller/Ruby1.8.7/lib/ruby/1.8/webrick/utils.rb:73:in
 'new'


 .

 What's the problem? How do you solve a problem?

 --
 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] How do I change the name of a label in a form?

2011-08-28 Thread Noel
   %= f.label My label %br /


On Sun, Aug 28, 2011 at 10:01 AM, Pepe Sanchez li...@ruby-forum.com wrote:
 Hi,

 Instead of having on the labels the field name I would like to change it
 some customized values.

 How can I change that ?

 Regards

 %= form_for(@client_workout) do |f| %


  div class=field
    %= f.label :client_name %br /
    %= f.text_field :client_name %
  /div
  div class=field
    %= f.label :trainer %br /
    %= f.text_field :trainer %
  /div
  div class=field
    %= f.label :duration_min %br /
    %= f.text_field :duration_min %
  /div
  div class=field
    %= f.label :date_of_workout %br /
    %= f.date_select :date_of_workout %
  /div
  div class=field
    %= f.label :paid_amount %br /
    %= f.text_field :paid_amount %
  /div
  div class=actions
    %= f.submit %
  /div
 % end %

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



-- 
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: Re: [Rails] Helper methods in coffescript files

2011-08-04 Thread Noel
you can do
myfile.js.coffee.erb

first it will be processed by ERB then CoffeeScript


On Thu, Aug 4, 2011 at 4:59 AM, robertj rob...@robkuz.com wrote:
 Hi,
 apart from the fact, that it might not be a good idea in terms of
 performance ...
 Is it possible? I am trying the same.
 Best regards
 Robert

 --
 You received this message because you are subscribed to the Google Groups
 Ruby on Rails: Talk group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/rubyonrails-talk/-/oTzNpWJ1mgsJ.
 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: Re: [Rails] Helper methods in coffescript files

2011-08-04 Thread Noel
sorry, had not read the full original post

On Thu, Aug 4, 2011 at 5:32 AM, Noel wwydi...@gmail.com wrote:
 you can do
 myfile.js.coffee.erb

 first it will be processed by ERB then CoffeeScript


 On Thu, Aug 4, 2011 at 4:59 AM, robertj rob...@robkuz.com wrote:
 Hi,
 apart from the fact, that it might not be a good idea in terms of
 performance ...
 Is it possible? I am trying the same.
 Best regards
 Robert

 --
 You received this message because you are subscribed to the Google Groups
 Ruby on Rails: Talk group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/rubyonrails-talk/-/oTzNpWJ1mgsJ.
 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] Simple search of entire database?

2011-07-15 Thread Noel
better to post the code here

gist.github.com

On Fri, Jul 15, 2011 at 10:50 AM, Jen jen.bot...@gmail.com wrote:
 Hi,
 I am trying to code a simple search, that will search my database for
 something like what ever the user enters.

 I can get the form to render ok, but am having some problems when submitting
 the test search. I'm wondering if my understanding of this code, which I
 have put together after reading several different posts on the subject is
 incorrect.

 I have commented what I believe is happenning, so hopefully someone can
 correct me.

 Thanks in advance,
 Jen.

 --
 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] After deleting the record , page is redirecting to Edit scree.

2011-07-14 Thread Noel
On Thu, Jul 14, 2011 at 5:18 AM, Simbolla vinod...@gmail.com wrote:
 Hi All,

 I am Vinod , new learner of Ruby on rails , i just followed the steps
 given in the Getting started with Rails in rubyguides , in that i am
 facing some wiard issue..

 that is When i click on the Destroy link in show page , it will give
 Prompt box where i click Ok button after that page will redirect to
 edit page (instead of show) and after that record will remain as it
 is , it will not get deleted.

 Please some body tell me that reason for this...


Post your controller code here
https://gist.github.com/


 Thanks
 Vinod

 --
 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] Validating for Real Zipcodes

2011-07-08 Thread Noel


Sent from my iPhone

On Jul 8, 2011, at 12:52 PM, Conrad Taylor conra...@gmail.com wrote:

 On Fri, Jul 8, 2011 at 12:29 PM, bertly_the_coder much...@gmail.com wrote:
 Hi guys,
 
 I have a location sensitive application where clients enter their
 zipcodes when signing up. Is there any tool out there, or anyway to
 confirm that the zipcode entered is indeed a true and valid zipcode
 and not just 5 random numbers?
 
 Thanks and Regards,
 Bertly
 
 
 Bertly, you might want to take a look at Geocoder:
 
 http://rubygems.org/gems/geocoder
 
 If you provide and invalid zip code, then you should get nil.  For example,
 
 $ irb
 ruby-1.9.2-head :001  require 'geocoder'
  = true 
 ruby-1.9.2-head :002  Geocoder.coordinates(25 Main St, Cooperstown, NY)
  = [42.700124, -74.922749] 
 ruby-1.9.2-head :003  Geocoder.coordinates(90230)
  = [33.9933257, -118.3987842] 
 ruby-1.9.2-head :004  Geocoder.coordinates(0)
  = nil 
 
 BTW, Ryan Bates also did the following screencast on this gem:
 
 http://railscasts.com/episodes/273-geocoder
 
 Good luck,
 
 -Conrad
  

USPS also has an API you can use. 


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



Re: [Rails] simple form question

2011-07-07 Thread Noel
it sounds like users can only create sites to their own customer
records.  This is authorization and can do handled with something like
the cancan gem.



On Thu, Jul 7, 2011 at 5:36 AM, paulo paul.a.taylo...@gmail.com wrote:
 Hi folks,

 I've done this a few ways that have all seemed a bit 'nobby' so was
 just wondering if there is a recommended way to achieve the following:

 I have 2 models, 'customers' and 'sites' which are connected with a
 has_many/belongs_to relationship.
 I have the scaffold form which creates customers, which is as desired,
 but I ONLY want to be able to create a site after going through
 the :show page of a customer and selecting an 'Add new Site' link.

 To do this, I can obviously just provide a link_to to the sites/new
 controller, but I need to pre-populate the sites 'customer_id' field,
 without displaying this in a way that could be manipulated (e.g. in
 the URL as a parameter).

 Unfortunately, I do need the 'sites' form to be on a separate page to
 the customer show page, otherwise it would have been very easy.


 Is there a better solution that POSTing to the site form with the
 values from the :show page, to then POST to the create method?


 Really appreciate any pointers on this,

 Paul

 --
 You received this message because you are subscribed to the Google Groups 
 Ruby on Rails: Talk group.
 To post to this group, send email to rubyonrails-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] Re: Rails Installer Problem

2011-06-30 Thread Noel
try
git commit -m Initial.

On Thu, Jun 30, 2011 at 1:38 PM, frandan...@gmail.com
frandan...@gmail.com wrote:
 That did it.  Thanks.

 New problem...

 C:\Sites\ridemogit init
 Initialized empty Git repository in C:/Sites/ridemo/.git/

 C:\Sites\ridemogit add .

 C:\Sites\ridemogit commit Initial.
 error: pathspec 'Initial.' did not match any file(s) known to git.




 On Jun 30, 10:31 am, Tim Shaffer timshaf...@me.com wrote:
 You probably need to designate that directory as a git repository first.

 git init

 --
 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] undefined method culture_id

2011-06-14 Thread Noel
I think the problem is that you dont have :culture_id = in the
Picture model.  Is that right?

On Tue, Jun 14, 2011 at 7:19 AM, Yennie joanne0...@gmail.com wrote:

 Hi all,

 I have an error which said undefined method culture_id
 but in the DB, it contains culture_id in user table..

 Picture.where(:album_id = :album, :culture_id =
 User.culture_id).first

 Please help to solve this problem...

 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.



-- 
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] undefined method culture_id

2011-06-14 Thread Noel
does
user_instance.culture_id
return something?

try doing the Picture query by putting in the culture_id yourself.
maybe you dont have a picture with that culture_id

Picture.where(:album_id = :album, :culture_id =3).first



On Tue, Jun 14, 2011 at 11:26 AM, joanne ta joanne0...@gmail.com wrote:
 I run those code in terminal

 user_instance = User.find(1)

 = it shows me all the data in the User table
 and then i run

 Picture.where(:album_id = :album, :culture_id =
 user_instance.culture_id).first
 =nil





 On Tue, Jun 14, 2011 at 2:15 PM, Tim Shaffer timshaf...@me.com wrote:

 I cannot explain it. You're not providing enough information about your
 environment and any error messages you may or may not be receiving.

 Which part returns nil?

 Did you run this on the command line?
   user_instance = User.find(1)

 Did it return nil? If so, you probably don't have a user by the ID of 1 in
 your database. Adjust accordingly to fit your environment.

 --
 You received this message because you are subscribed to the Google Groups
 Ruby on Rails: Talk group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/rubyonrails-talk/-/m-fUx744LKkJ.
 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.



 --
 

 Thank you,

 Yen

 --
 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] Re: Stupid newbie question

2011-06-03 Thread Noel
There's probably going to be lots more pain related to any gems used
in that app.

All in all seems like about time that app get some serious love and
get updated at least to Rails 2.3 Ruby 1.8.7



On Fri, Jun 3, 2011 at 11:49 AM, gnarmis g13si...@gmail.com wrote:
 After using RVM with ruby 1.8.6, try also doing gem installs with lower
 versions of the gems you're installing.
 If macports is giving u trouble, uninstall macports. Install Homebrew.
 If everything fails, just use a simple Ubuntu VM and go from there. You
 still have options.

 --
 You received this message because you are subscribed to the Google Groups
 Ruby on Rails: Talk group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/rubyonrails-talk/-/Y1BFeWRxOU4zMjRK.
 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] Stupid newbie question

2011-06-02 Thread Noel


Sent from my iPhone

On Jun 2, 2011, at 3:53 AM, Sta Canovist stacanov...@gmail.com wrote:

 Yes, Im new to Ruby. COming from PHP/Java world. I DON'T want to learn
 ruby, sigh.
 Anyway I got a project that is done in ruby and it need some
 modifications sometimes.
 
 So until now, dont know how, I managed fixing a few things on that
 application.
 Sometimes was about setting a page to show more fields than before. Or
 maybe block a page redirecting it to an access denied page.
 
 But now things are gotting more serious and bigger modifications are
 needed. I think I can manage doing that. But working like have done
 until now is VERY unefficient. Basically, Im working directly on a
 test server. I NEVER managed (this is the real big problem) in
 installing the app, correctly, on my local machine. Im getting mad in
 trying to do it it but with no success.
 
 Thus the problem is about succesing in making the local app working.
 Explaining in details everything I guess would make most of you stop
 reading this post. So I try with another strategy. Here it comes:
 
 I am on MAC. Ruby is installed by default. I MUST use Apache as
 server. So I put a virtual host poiting to /MY_PATH_RO_ROR_APP/public
 
 When typing http://localhost/ then I see the content of the public
 folder.
 
 The APP is empty. Im not using things like generate or scaffolding.
 Why? Well, because my thought was to just copy all the application
 located on the test-server and making it work. Is that bad? I dont
 know. I would prefer not to go through all ruby stuff.
 If it is bad it is ok, as long as this is not the cause of the thing
 that the app is not working.
 
 What I need to do is to create a controller manually and connect it
 through the route.rb.
 
 i create a file in the app folder named product_controller.rb:
 
 class ProductController  ApplicationController
 
  def show
render :text = 'abcd'
return
  end
 
 end
 
 
 Now I want to map the route. How can I do this? I tried different
 ways. For example:
 
 map.resources :product
 
 or
 map.connect ':controller/:action/:id'
 
 or
 map.connect ':controller/:action/:id.:format'
 
 or
 map.connect ':product/:show'
 
 Well, everytime I try then to type something in the browser. I try for
 example:
 
 localhost/product/1
 localhost/product/show
 localhost/product/1/show
 localhost/product
 
 Well, all the time I can see the same error in the log:
 
 File doesnt exist.
 
 Right now Im thinking that the url-requests are managed by apache. And
 that apache doesnt understand that this is a ROR app? Is that the
 problem maybe??? And does anyone know how to make apache understand
 that that one is a ruby app??
 

Apache alone can't serve a Rails app. You need passenger. 

Rails also comes with a webserver if u cd to the project dir and type 
script/server

If you need to maintain a rails app it might be good to learn some Ruby. Trust 
me there are worst things out there. Google tryruby

Above I made the guess that ur  app is not rails 3. You should find what 
version of rails you are using because something like routing differs. 

-Noel 

 -- 
 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] Rails 3.1.0.rc1 assets not compiling

2011-05-29 Thread Noel
found the problem.

There can't be any blank lines in the manifest

https://github.com/noel/happy/blob/master/app/assets/javascripts/application.js#L8-10

Is this a bug or should the text in the generated file be more explicit?



On Sun, May 29, 2011 at 8:19 AM, noel_g wwydi...@gmail.com wrote:
 I started a test app to try out 3.1

 At first .coffee files were compiling into application.js, but now
 nothing is compiled.

 I set up 2 .coffee files with alerts and expected //=require_tree to
 incorporate them into application.js, but that does not happen.
 ran rake assets:precompile and indeed the file in public/assets
 matches what I see in the browser.

 Here is a list of my gems
 https://gist.github.com/990283

 and here is my sample app
 https://github.com/noel/happy

 I also tried requiring specific files like
 //= require foo
 and that had no effect.

 interestingly if I also required a file that does not exist like
 //= require bar

 I see no console errors during compilation

 Any ideas what could be the cause?

 --
 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] Wrong information

2011-01-20 Thread Noel F.
Hi,

I have stumbled across an issue using ruby, I want to put 105°C into a
text box using ruby however instead of that it is inputting 105 °C. Can
anybody explain a way around this problem?

Cheers,
Noel

-- 
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: Wrong information

2011-01-20 Thread Noel F.
Hi Peter,

Thanks for the help, so is it a problem in the browser or problem with 
ruby?
I can manually type 105°C and it works fine.

Regards,
Noel

-- 
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] div_for and RJS

2009-05-08 Thread Noel Miller

Do you have to use an activeRecord object for div_for?
Perhaps I'm taking the wrong approach for dynamic divs

so far my education:

1. id= , is fine for just one div and prototype activity in an RJS (I
got this to work)
2. class= , another option, but I don't see how it can be used
3. div_for , a helper that uses ActiveRecord objects to come up with
multiple divs

Below: code that is my best guess for how to proceed, but it doesn't do
everything it is supposed to do:


script src='http://pastie.org/472556.js'/script

script src='http://pastie.org/472563.js'/script
-- 
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: div_for and RJS

2009-05-08 Thread Noel Miller

the code is here
http://pastie.org/472556
and here
http://pastie.org/472563

sorry about the extra bits

-- 
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] calling save in after_create hook

2008-09-23 Thread Noel Walters

Scenario:

I'm creating an image file upload service for my web site.

As well as saving the actual file I also need to create a database
record for the file.

I would like to name the file after the record id, but I also need to
save some attributes of the image (width/height/mime_type etc) which I
can't discover until after the file is created.

The Problem:
1) The id is not available until after the record is saved so I can't
create the file until after the record has been created

2) if I try to update the record in the after_create hook it creates an
extra record in the database instead of updating the existing one.

Is this a bug?

Any advice to resolve this problem would be most welcome.

It could be done in the controller of course, but I feel it belongs in
the model.
-- 
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: calling save in after_create hook

2008-09-23 Thread Noel Walters

OK - my bad. All works OK, can't explain how I made this mistake but it 
seems it was working all along.
-- 
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] send_file problem with IE7. Save Image as untitled.bmp

2008-09-16 Thread Noel Walters

Platform = Linux and Mongrel

I'm using send_file to send images from a controller. like this:

send_file( @content.location, :disposition = 'inline', :type =
File.mime_type?(@content.location)) # mime_type? courtesy of mimetype_fu

This is called for in an ordinary img tag.

It all works perfectly except for one minor hitch which is driving me
mad.

If you right click on the image in IE7 and choose Save Image As... the
file save dialog always defaults the filename to untitled.bmp.

Other browsers always get the correct file name (usually something like
61.png or 18.jpg)

If I copy the file into the corresponding path under RAILS_ROOT/public
then IE7 will get the filename correct - as will all browsers.

Interestingly if you do save the file as untitled.bmp it's a perfectly
good bmp file.

The HTTP headers set by mongrel differ substantially from the ones set
by send_file.

Using send_file gives:

Status=OK - 200
Date=Tue, 16 Sep 2008 18:16:59 GMT
Server=Mongrel 1.1.4
Vary=Host
Status=200 OK
X-Runtime=0.01416
Content-Transfer-Encoding=binary
Cache-Control=private
Content-Disposition=inline; filename=16.jpg
Content-Type=image/jpeg
Content-Length=164553
X-Cache=MISS from www.sharehost.co.uk
Keep-Alive=timeout=15, max=100
Connection=Keep-Alive

Serving the file from the public area gives:

Status=OK - 200
Date=Tue, 16 Sep 2008 18:17:09 GMT
Vary=Host
Etag=48cfb25c-65c2f-918190
Last-Modified=Tue, 16 Sep 2008 13:19:24 GMT
Content-Type=image/jpeg
Content-Length=416815
X-Cache=MISS from www.sharehost.co.uk
Keep-Alive=timeout=15, max=99
Connection=Keep-Alive

Anybody know what I can do about this?
-- 
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: send_file problem with IE7. Save Image as untitled.bmp

2008-09-16 Thread Noel Walters

Mark Reginald James wrote:
 Noel Walters wrote:
 
 If you right click on the image in IE7 and choose Save Image As... the
 file save dialog always defaults the filename to untitled.bmp.
 
 Try using send_file's :filename option.
 
 
 --
 Rails Wheels - Find Plugins, List  Sell Plugins - 
 http://railswheels.com

I already tried that but it makes no difference - the response headers 
are exactly the same. In fact in the one instance when explorer gets it 
right (when the file is served normally without using send_file) there 
is no content-disposition header and no mention of the filename in any 
of the other headers either.

Thanks anyway!
-- 
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: send_file problem with IE7. Save Image as untitled.bmp

2008-09-16 Thread Noel Walters

brady8 wrote:
 Your other solution that should work is to set the header directly
 that IE is parsing, Content-Disposition.
 
 i.e.:
 
 headers['Content-Disposition'] = inline; filename=\ + @filename +
 \
 
 -Brady
 [EMAIL PROTECTED]
 
 On Sep 16, 12:28�pm, Noel Walters [EMAIL PROTECTED]

Thanks, but send_file already puts the correct Content-Disposition 
header in the response, but IE only seems to work properly when it's 
missing - but there are other differences in the headers, so I can't 
tell if that is significant or not.

Here is the response header that you get when the server sends a file 
from a public folder. It works properly with all the browsers I've tried 
-

Status=OK - 200
Date=Tue, 16 Sep 2008 18:17:09 GMT
Vary=Host
Etag=48cfb25c-65c2f-918190
Last-Modified=Tue, 16 Sep 2008 13:19:24 GMT
Content-Type=image/jpeg
Content-Length=416815
X-Cache=MISS from www.sharehost.co.uk
Keep-Alive=timeout=15, max=99
Connection=Keep-Alive

This is what send_file is producing. It doesn't work properly with IE -

Status=OK - 200
Date=Tue, 16 Sep 2008 18:16:59 GMT
Server=Mongrel 1.1.4
Vary=Host
Status=200 OK
X-Runtime=0.01416
Content-Transfer-Encoding=binary
Cache-Control=private
Content-Disposition=inline; filename=16.jpg
Content-Type=image/jpeg
Content-Length=164553
X-Cache=MISS from www.sharehost.co.uk
Keep-Alive=timeout=15, max=100
Connection=Keep-Alive

I did wonder if the doubled Status header is the source of the problem - 
but I've no idea how to get rid of it without abandoning the use of 
send_file.

if there was a way to get send_file to produce a response like the 
first one I'd be quite happy.

otherwise I'll just have to put up with it - it's not terribly serious 
just inconsistent.

Maybe I could make the controller create a publicly accesible symlink to 
the file, do a redirect to the same controller/action and then delete 
the link again.

I've been frigging about with this for 3 days now. Not feeling terribly 
Agile.
-- 
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---