|Related to : Ruby on Rails: Replacing the “LIKE” part of the SQL query with Ruby code|
|Does the hoster has to support “Ruby on Rails” or “just Ruby” to run Rails?|
Does the hoster have to support "Ruby on Rails" or "just Ruby" to
I know mainly PHP and ask myself if "Ruby on
Rails" behaves to Ruby ... like "Zend Framework" to PHP: just a bunch
of PHP files I can copy in my project folder and my hoster only needs
to support PHP.
I ask as my host only supports Ruby (but
not Rails). If I couild just copy rails over sftp within the project,
I would like to give it a try.
|Easiest way to “goto source code” for Ruby/Rails|
As a Ruby/Rails non-pro, I often want to check out the code for a
rails method to see how it's implemented...
I was using "form_for", and I wanted to check out the code to see how
it works. The slightly lame way I did this was to just google "rails
form_for" which takes me to
where I can view the source for form_for.
rails/ruby pro's accomplish a similar task? Is there a simple way
(without using IDEs) that you can quickly dig this out? Or is it a
case of over time learning where stuff is located and find/grep-ing
|RUBY ON RAILS - “msvcrt-ruby18.dll was not found” with Ruby|
i am using:
try to run rake db:migrate. i get the following error in
This application has failed to start because
msvcrt-ruby18.dll was not found. Re-installing the application may fix
need help here..
|Ruby on Rails: Replacing the “LIKE” part of the SQL query with Ruby code|
In my application I have a "LIKE" SQL query that is something
Item.where("name LIKE ?",
But I want to hit the db
only 1x (at application start-up), since the number of Items is huge,
and load this generic part...
...into memory (a global variable), so I can later reuse its
content throughout the app, in different cases, and refined with some
case-specific Ruby code (see the "LIKE" part).
speediest way to do such "filtering" with Ruby?
|When you run “rails server” how do you get the ruby version to match what you see with “ruby -v”?|
I can't seem to get my version of ruby when running "rails server"
to be the same as the one in terminal. If I run commands like
ruby -v I get 1.9.3 which is the version that I want to
use. But I get 1.8.7 when I use
rails server. Any idea
how I get get my local server to leverage 1.9.3? I am using a Mac
=* ruby-1.9.3-p125 [ x86_64 ]
=> - current
# =* - current && default
# * -
CHRISs-MacBook-Pro:test_app chrisrothstein$ ruby -v
ruby 1.9.3p125 (2012-02-16 rev
|where in the Ruby or Ruby on Rails API doco is the Date “dweek” method?|
where in the Ruby or Ruby on Rails API doco is the Date "dweek"
Example of usage:
development environment (Rails 3.2.1)
1.9.3p0 :001 > d =
=> Sun, 04 Mar 2012
1.9.3p0 :002 >