I think Aptana is the best from what I've seen. Good git integration and
built it command console.
On Wednesday, October 3, 2012 1:33:30 PM UTC-4, Avi wrote:
>
> Hello,
>
> What is the best IDE for ROR with JRuby,
> Currently I am using Aptana Studio. I am trying to use Rubymine.
> Which IDE woul
How many records are you talking about?
For a few records, once in a while, you could do it in Ruby - Google using
ActiveRecord outside of Rails for some more info.
Why do you have deleted tables? You might consider adding a field like
"Active" and filter the non active records
On Monday, Augu
You could convert the string to a time object and pick out the
specific parts you want. This might come in handy if you want to store
the time in the database at some point.
http://api.rubyonrails.org/classes/Time.html
On Jul 10, 11:47 am, Erwin wrote:
> I tried :
> output = "00:00:03.10"
>
> ou
Rails on Windows is a painful process isn't it?
I had some dealings with rmagick which were mitigated by using
Paperclip.
I did find this though -
http://stackoverflow.com/questions/5811388/imagemagick-core-rl-magick-dll-not-found-or-how-to-install-rmagick-on-window
Hope this helps
If you have
Instead of trying to re-invent the wheel, or a picture of that wheel,
take a look at Paperclip or Carrierwave. Both are plugins that make
storing and displaying pictures simple.
I would recommend as well to use a file system storage solution
depending on the scale of the project
On Jun 12, 10:51
There are some good books about beginning Rails development - even
some of those geared toward Rails 2 will give you a basic
understanding of the model view controller theory which is Rails.
Don't be afraid to try things as well, you'll learn a lot more this
way.
On Jun 9, 3:06 am, Sta Canovist
Here's how I display images with paperclip:
<% if items.picture.url(:medium) =~ /missing.png/ %>
<%= link_to image_tag( items.picture.url,:size =>
'300x300', :border=> 0), items.picture.url, :target => '_blank' %>
<% else %>
<%= link_to image_tag( items.picture.url(:medium), :border=> 0
Should be able to do something like to separate the tasks:
u = open( "myfile" )
while line = u.gets
if line.include?( "taske :" )
anArray = line.split(' ')
puts anArray[1] if anArray.length > 0
end
end
You could even combine the split function with
Take a look at some of the tutorials around the internet for Ruby and
Rails to get an idea of what the framework is first.
You say the app has been started, if you have a local copy of the
files - back them up and then browse the code.
I agree with the other posters as to wanting more information
You could log the output you wish to display. I think this would be
the best way if using a remote site.
But, if it's a local process and of limited use printing to the
console is ok. I wrote a rails program to track my local IP address as
it would change at random intervals and have the process p
I've used NetBeans on Linux and Windows and was happy with it.
Aptana is very good for RoR dev with GIT integration
On the horizon is Redcar an IDE written in Ruby that lists TextMate as
a major inspiration.
On Nov 26, 5:58 am, Emanuel wrote:
> can anybody tell me wat are the editors available
You may want to consider rebuilding your app under Rails 3 as there is
quite a bit of difference. I upgraded a project from Rails 2.3 to 3.0
and it was difficult.
There are several guides out there though for upgrading.
On Oct 11, 10:51 am, Marnen Laibow-Koser wrote:
> Premanshu Mishra wrote:
>
Nice solution!
Another possibility would be to use the before_create and delete
methods.
Or just have the new controller pull the latest info from your other
models by looking at the updated_at field. This way you wouldn't have
to have an extra step when deleting items.
On Sep 28, 11:03 am, horn
I stay on the command line for the generators and such, using Netbeans
to do the other programming tasks.
On Sep 23, 4:00 am, Vitaliy Yanchuk wrote:
> Try to set config.action_controller.consider_all_requests_local = true for
> your development environment
> It will show proper Exeption messag
If this is only in the show method - one record, I assume, why not
pass the height and width as instance variables in the method call
which are then available in the view?
On Sep 19, 10:11 am, Abder-Rahman Ali wrote:
> radhames brito wrote:
> > show the code where you are trying to access, ill se
If you're getting the original image then you have ImageMagic setup
correctly.
On Windows there is a bug in the current paperclip gem where the
ImageMagick arguments are surrounded by single quotes, which windows
doesn't like.
Take a look at the console output to see the errors, try the commands
Windows will always be slow with the stock rails app. Windows will
load the rails environment every time which takes about 20 secs on my
vista box.
I've recently looked into this after taking several minutes to debug
some tests. One of the possible solutions is to use to RSpec. I'm no
expert on it
You might take a look at your routes for future reference.
Specifically, take a look at RESTful routing where rails does most of
the work for you. The home path you setup could easily be the index
path for your base controller.
On Sep 12, 4:05 pm, Anders_P wrote:
> Thanks radhames!
>
> I finally
You might install rvm as well. I've fund it to be very helpful being
able to have multiple - isolated - ruby and rails versions. One of the
best features is to have a per project gem setup.
I had problems with ruby on Kubuntu without rvm, now it is smooth
sailing
On Sep 12, 11:37 am, Brian Prior
Or include a separate variable with the sum you want to include in
addition to the will_paginate variable.
@figures = Figures.paginate...
@figure_sum = Figures.sum(...
On Sep 11, 1:13 pm, radhames brito wrote:
> add a hidden field with [] in them it will make the params create an
> array and
What is the difference between persons and contests as far as scores
are concerned? Looks to be a polymorphic relationship based on the
context of your post. Person to Scores and Scores to Contest.
I agree with radhames, though in lower case. I've found that you need
only be concerned with one lev
Netbeans works well, if you're concerned about the bloat/response
simply turn some of the features off. I've used Rails for a few years
and a basic editor just seems so, well basic. Netbeans isn't perfect,
I don't use it to run the server or do the tests but for the simple
pleasure of jumping betwe
Take a look at some Rails testing resources -
http://guides.rubyonrails.org/testing.html
- take a look at the fixtures part.
I can't think of a reason not to have a separate testing database or
to try and run tests on the dev db, unless you are trying to re-invent
the wheel and make your own tes
I found a couple of good books, Simply Rails 2 by Lenz is my favorite.
Of course it's for Rails 2. You may have to wait for a while for the
new crop of Rails 3 books to come out. Or try to update the examples
to work in Rails 3.
Judging by your questions about template engines and user management,
I didn't see the avatar_file_size, avatar_content_type, and
avatar_created_at fields in your form. I don't know if these are
required though as they should be created when you submit a
file_field.
You can store the images in the database if you want to, but most
would recommend you don't.
Have yo
I noticed in your form that you didnt specify any of the support
fields that paperclip uses -avatar_file_name for example - if these
aren't in the params hash they won't be saved in the db. In a recent
project I added all the fields to the form, but you could add them as
hidden.
Paperclip doesn't
On the off chance you meant using Rails elsewhere - I have used
ActiveRecord outside Rails for some database programming.
On Aug 7, 4:33 pm, Tony Mr wrote:
> Can ruby be on anything else besides rails?
> --
> Posted viahttp://www.ruby-forum.com/.
--
You received this message because you are sub
I use Windows Vista for a lot of my RoR development as it's convenient
for me with my current setup even though I run an Ubuntu box as well.
Not everything works in windows, as you might expect, but 95% of it
does. This is with a regular ruby install, no instant rails- which is
out of date.
You w
Finally - a subject near and dear to my heart - beer!
One thing to remember about nested resources is its best to nest one
level at a time. Otherwise you get very complicated url's.
Depending on how you set the relations, you could have beer as a
nested resource of brewery and then set a separate
I use Delphi (Lazarus) at work and I constantly miss ruby features :)
I can only echo Marnen's remarks about Rails, Delphi does some weird
things and I've found that doing it the "Rails" way is usually simpler
and much more efficient.
As far as the bookings, you should do a bottom up review by st
> > And then in the controller:
>
> > @inactive = Item.inactive
>
> This looks like it will still fire off a query which is what I want to
> avoid.
The query would only fire (once) prior to rendering the view. For
example, if you set the variable in the index action of the controller
the query w
Did you rake db:migrate?
On Jul 11, 7:31 am, DrSney wrote:
> Hello, please help me with one little error that I have here. I have
> created database structure, than generated scaffold for it (script/
> generate scaffold Artist). But when I try to use it, all i have is
> this (db contains t record
There are a few ways to do this.
One would be using a named_scope in Rails 2 or just plain scope in
Rails 3
class Bookings < ActiveRecord::Base
named_scope :discount, :conditions => { :discount > .5 }
I like to model class methods for pulling specific information from
the database
def self.
I had a much easier time installing rails on gentoo then ubuntu.
Of course on gentoo you have a lot more control over what's installed
with the price of knowing what to install.
Any distro will do though. I'd suggest looking into rvm as well.
On Jul 7, 2:58 pm, Sal wrote:
> I'm curious to know
Every book is likely to contain some errors, most will have forums
where you can ask questions of the subject material as well.
Netbeans has everything I need. The side panes which show the project
structure and page elements which make not only navigating, but
understanding, the project easier. T
I really liked "Simply Rails 2" by Patrick Lenz. It's the only rails
book where I went through all the code examples.
As far as an IDE goes - I like Netbeans. You can code with a simple
editor but nothing beats the view Netbeans gives you.
On Jul 6, 4:11 pm, Marnen Laibow-Koser wrote:
> Angel
Ubuntu works well, but I would use rvm with rails - very good
experience with me using it/
On Jul 1, 4:36 pm, Nick Hird wrote:
> This may be the wrong place for this question but i am not sure where to go.
>
> What is a good linux distro to get started with rails 3? I have given up on
> ubuntu an
I've had an issue with the sqlite driver. What version are you using?
Looking at the RubyForge site, they've released version 1.3.0 of
sqlite3-ruby on June 6th - upgrading this might help
On Jun 28, 3:49 pm, Joe wrote:
> Hi everyone,
>
> First of all, I'm running Mac OS X Snow Leopard.
>
> Trying
Perhaps you can add a link_to_remote, either in the section or
surrounding it, to add an extra option then update the select list.
The Rails Cookbook has a section on using ajax to add DOM Elements to
a page
And there is this :http://api.rubyonrails.org/classes/ActionView/
Helpers/PrototypeHelper
Ar is correct - Virtual Box http://www.virtualbox.org/ is one such
path and is free for personal use.
You might checkout Capistrano - http://www.capify.org/index.php/Tutorials
And depending on what you're deploying you might be interested in
Heroku - http://heroku.com/
On Jun 22, 8:46 am, Ar C
You could add a status field to your higher level models - for
example, add 'status' to User as an integer and then store your
status:descriptions in a common status table. So you store an integer
referring to the status in your User model and if you need to display
the description, query the statu
The web server simply looks at the information you submit ( a page for
example) and routes it to the proper destination in rails. With me
it's frequently error pages though.
Rails comes with a web server named webrick which works nicely enough
for learning about Rails. Mongrel is a separate, highe
What do you have in your by_company method?
looks like you had in your find statement - params[:id] and it should
have been params[:company_id]
You might take a look at generating a class method in your model file:
def self.by_company( anId )
find(:all, :conditions => ["company_id = ?", anId]
I'm writing an application to track calibrated assets. If I were to
have one controller it would have to be able to update(delete, create,
read) the items,vendors, issues...etc. It would be huge and certainly
unwieldy, not to mention very difficult to do in the Rails framework.
The Items controlle
Can't you declare the resource in the singular form?
http://api.rubyonrails.org/classes/ActionController/Resources.html#M000308
On Jun 20, 3:12 pm, Rory McKinley wrote:
> On 20/06/2010 20:59, Marnen Laibow-Koser wrote:
> > Wrong. If that were so, map.resource wouldn't exist.
>
>
>
> I think
Look at your link_to in the index.html, it should contain the id for
the story you want to show.
Also, check to make sure that you have the to_param method in your
model, story.db and that it's correct. The author implements a
complicated beautification of the urls which is a waste in the course
o
Seems others are having this issue on Windows as well.
Try here for some direction:
http://groups.google.com/group/rubyinstaller/browse_thread/thread/bd7ec8e1dab4ff17
Hope this helps
On Jun 20, 2:11 pm, Joe wrote:
> When trying "gem install sqlite3-ruby"; it spits out "no definition
> for libv
I like the IDE approach overall. Netbeans has some nice autocomplete
features that really help in writing the code, but then again a simple
editor can work well too.
For the gitignore, just add a pattern of which files you don't want
included either in the root directory or in the specific directo
What do you have in your routes.rb file to setup the custom route?
http://guides.rubyonrails.org/routing.html
On Jun 15, 11:27 am, Aashish Kiran wrote:
> hi, can anyone help me. i want to create an url to invoke create action
> of a controller. routes.rb has the routes. But i am getting error a
ssibility
that having the same method and div name might have caused the
confusion.
Then adding a "render :nothing => true" to the search_remote method
cleaned out the div.
In the future, I think I'll add a separate search page.
On Jun 12, 10:52 pm, Frederick Cheung
wrote:
&g
I'm trying to add a simple search to an index page of my project. It
takes a term, does a 'like' query and populates a common partial which
is displayed with javascript in the div 'search_remote'.
It runs fine, once. If you run multiple queries without hiding the
div, it works fine. If you close t
The best book on learning Rails that I have ever read is "Simply Rails
2" published by Sitepoint (http://www.sitepoint.com/books/rails2/?
historicredirect=rails1 ). It is laid out in a very good way and it's
the only book where I went through all the examples.
Later on I would recommend "The Rails
Do you have the js includes in the application layout?
Happened to me a few times when playing with several projects.
On May 23, 3:09 am, nirosh wrote:
> here i given my codes when i execute this remote_function rails give
> me this error
>
> ActionController::UnknownAction (No action responded
<%= bar.to_s %>
On Feb 27, 11:30 am, Dudebot wrote:
> OK, here's what I have in app/views/molds/show.html.erb:
>
> <%= @mold.body.gsub( "\n", "" ) %>
>
> The controller finds @patient, and @patient.id = 2
>
> If @mold.body = "The patients id is <%= @patient.id %>"
>
> Then the view displays
>
> T
Maybe with some Javascript - link_to_remote? You could also look into
a rjs template which can modify a part of the page - an element, maybe
one named "flashing text"...
Simply Rails 2 by Patrick Lenz is a very good book which is where I
got the above info.
On Nov 10, 8:06 pm, Arif Bandali
wrot
No need to reinvent the wheel with file uploads, I've used PaperClip
to handle uploaded images and files with little trouble.
It's very easy to configure as to where the information gets stored -
in the database or out.
On Oct 31, 8:47 am, RubyonRails_newbie
wrote:
> Hi Everyone!
>
> I'm tryin
I wouldn't limit your question to seasoned developers :)
While I wouldn't consider myself seasoned - I've written a few apps
for local use and am getting ready to publish an open source RoR app,
I don't even know how little I know.
Rails makes life easier by it's basic core principles -
Convent
Sounds like a cms app for which there was a recent post on the list
for.
> Radiant is probably the best known. AdvaCMS looks quite promising, but
> seems a bit immature at the moment. There's also BrowserCMS
One that I like is Wagn: http://www.wagn.org/wagn/Introduction
It has a unique card li
One other way to think about this - you shouldn't need to nest
resources more then one level deep.
You only deal with children in relation to parents and dogs in
relation to children. Separate relationships which can be handled
transparently. Plus the links you have to generate get a lot more
con
Hmm... that last replay was so helpful I'll really have to try
There is a plugin available - http://ym4r.rubyforge.org/ym4r_gm-doc/
which seems to be coming along nicely. I haven't used it yet so ymmv.
Lot of other ways to do this as well - Google search is your friend
too :)
On Sep 5, 1:05
I would worry about changes to the Java language that would affect
JRuby. Ruby implementation is never going to be a big concern of the
Java devs, nor should it be.
On Aug 16, 1:45 am, AlwaysCharging wrote:
> Why would anyone use ruby over Jruby? I'm admittedly a noob about all
> this stuff, bu
If just want to process some basic commands in a web environment you
could create a form which simply re-displays itself.
Setup a class variable (or simply use the flash notification) to hold
the result of whatever you want to do and instead of redirecting to
show or index, redirect to new. Then
Take a look at: http://guides.rubyonrails.org/security.html
and then look at what you're trying to provide.
Is it really worth the risk?
A compromise might be http://redcloth.org/ a Textile to Ruby module
On Jun 29, 5:59 pm, Xdmx Xdmx
wrote:
> Hi, i wan't to permit users to send their own con
First, try not to worry so much about how the tables are set up, you
can create a view to the data to suit your needs. What you need to be
concerned about is how to make the information easy to use and to not
repeat yourself.
As to modeling the data - It seems that the User table would be the
cen
It seems like the two controllers could be combined. Validating the
card and choosing a subscription type would be part of the same order,
so you could add the subscription types to the credit card controller
as an instance variable.
On Jun 8, 5:05 am, Vikas Gholap
wrote:
> Hello all,
>
> I ha
Does seem to be a bit of repetition in your description but it seems
straightforward.
You have a Module which has an Entity_type column
Each Module has many Chapters where Chapters has a column named
module_id.
Each Chapter has many Activities with similar foreign key constraints
or
You have on
A quick Google search turned up a few possibilities:
(ruby geolocation)
http://earthcode.com/blog/2007/02/geokit_map_plugin.html
There are a few ways though to take a lat/long and transpose them to a
map or do other fun things with them. Try looking at Google maps as
well.
On Jun 6, 1:47 pm, f
first place.
If you want the code to work, replace 'test' in the index view with
'@array'
On May 10, 1:35 am, 7stud -- wrote:
> AGoofin wrote:
> > When you render a partial you automagically get an object with the
> > same name available in the partial
&g
When you render a partial you automagically get an object with the
same name available in the partial
For example, render :partial => 'foo' passes the instance variable
named @foo to the partial where I can then say: for f in @foo.
In your first post you iterate over 'test' but that variable is
Your Team has many members and should be noted:
class Team < ActiveRecord::Base
has_many :members
end
This is assuming that you have a column in your member table named
team_id. I think this is what you were asking about with the foreign
keys.
As a somewhat noob to Rails myself I found a fe
70 matches
Mail list logo