On *nix systems, the file /etc/hosts contains the mapping from localhost to
127.0.0.1. It should contain a line like:
127.0.0.1 localhost.localdomain localhost
I do not know whether or not Mac uses the same file.
On Tuesday, October 14, 2014 10:05:13 PM UTC-4, mike...@comcast.net
You can extend the class yourself:
DateTime.class_eval do
define_method(:truncate_precision) { |amount|
puts amount
}
end
=> #
DateTime.now.truncate_precision(sec: 10)
{:sec=>10}
=> nil
On Monday, October 6, 2014 8:17:58 AM UTC-4, powi wrote:
>
> Hello.
>
> I thought of adding a method i
Both problems solved.
To solve the first problem, I trashed what I had done and started over. I
do not know what went wrong the first time.
The second problem was caused by pilot error.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
I've added another engine. Again it runs just fine as a stand alone
application (test/dummy) and as an engine inside the main application, but
this time when I use cucumber it mangles the route. The generated
controller name is NamespaceController, instead of Namespace::Controller.
The only s
Please help. I am stumped.
I have four engines inside a rails application. The cucumber scenarios run
just fine in three of the engines. The fourth fails with the error:
No route matches [GET] "/stylesheets/common_engine/application.css"
(ActionController::RoutingError)
/usr/local/ruby-1
On Tuesday, February 11, 2014 3:43:40 PM UTC-5, Vell wrote:
>
> Hello all,
>
> I am trying to understand when I try to run a test in cucumber what I am
> missing that it is failing. I am using FactoryGirl to create my records and
> using cucumber to test my logic however I know that I am doing
On Monday, January 20, 2014 9:23:10 AM UTC-5, Jordon Bedwell wrote:
>
> On Mon, Jan 20, 2014 at 8:10 AM, jsnark >
> wrote:
> > *.erb files do not connect to databases. Models do. Follow Colin's
> advise
> > and work through the tutorial.
>
> If *.er
*.erb files do not connect to databases. Models do. Follow Colin's advise
and work through the tutorial.
--
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
t
Problem solved.
The namespaced paths generated by engine.path need to be modified by
prefixing them with the applications base path. I use the apache
RewriteRule for this:
RewriteRule ^/engine/?(.*) /app/engine/$1 [R]
--
You received this message because you are subscribed to the Google Group
I'm having problems deploying a rails application that contains engines.
When I had namespaced routes (Engine::Application.routes.draw) in
routes.rb, I was unable to get past the "no such file or directory" errors
from apache. The request never got back to the application.
When I used global
Look at the file
/apps/myapp_com/staging/shared/bundle/ruby/1.9.1/gems/nokogiri-1.6.1/ext/nokogiri/gem_make.out
If you can not figure out what the problem is, post that file here.
On Tuesday, January 14, 2014 7:45:25 AM UTC-5, der_tom wrote:
>
> * executing "cd /apps/myapp_com/staging/releases
Found the solution. This explanation may not be 100% accurate.
Bundle remembers how it was first executed in the directory '.bundle'.
Subsequent executions use this information. 'bundle install' puts the gems
in the vendor/bundle directory. 'bundle package' puts the gems in the
vendor/cache
I created two rails engines. In one of them 'bundle install' generated
only a vendor/cache directory. In the other one, 'bundle install' created
both vendor/cache and vendor/bundle. The vendor/bundle directory is
causing me some problems. I do not remember what I did differently when
creati
I have several rails applications that I want to combine into a single
application using rails engines. Many of the models appear in multiple
applications (now engines) and have some methods in common. I want to make
this code DRY, removing the code duplication that I now have. Ideally, I
wa
On Friday, December 27, 2013 11:13:03 AM UTC-5, Hassan Schroeder wrote:
>
> On Fri, Dec 27, 2013 at 7:41 AM, jsnark >
> wrote:
>
> > Thanks. Upgrading to rails 3.2.12 did the trick.
>
> Uh, and you realize that 3.2.13, 3.2.15, and 3.2.16 (latest 3.2.x) all
> i
On Thursday, December 26, 2013 5:24:43 PM UTC-5, Frederick Cheung wrote:
>
>
>
> On Thursday, December 26, 2013 8:41:21 PM UTC, jsnark wrote:
>>
>> I'm working through the Rails Engines tutorial at
>> http://edgeguides.rubyonrails.org/engines.html. I'm
I forgot to add-
Google did not help me.
--
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 g
I'm working through the Rails Engines tutorial at
http://edgeguides.rubyonrails.org/engines.html. I'm using ruby 1.9.3 and
rails 3.1.12 on Linux. I'm stuck on section 4.1. When I try to access
localhost:3000/blog I get:
Started GET "/blog" for 127.0.0.1 at 2013-12-26 15:25:12 -0500
ActionCo
http://smartinez87.github.io/exception_notification/ should do what you want
--
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...@
I would use javascript and jquery to keep track of the user's last
selection. Then, also with javascript, intercept the submit and using ajax
send the request containing only the last selection.
On Friday, October 4, 2013 5:54:43 AM UTC-4, Ruby-Forum.com User wrote:
>
> Hi,
>
>
> Please help m
carts.yml does not create the cart with id=1 that LineItem.find(1) refers
to.
--
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..
Oops.
<%= "#{@formatted_question[:question].gsub(/\n/, '').html_safe}" %>
On Wednesday, September 11, 2013 8:46:16 AM UTC-4, jsnark wrote:
>
>
> <%= "#{@formatted_question[:question].gsub(/\n/, '')}" %>
>>
>>
--
You re
> <%= "#{@formatted_question[:question].gsub(/\n/, '')}" %>
>
>
--
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...@googlegrou
Netbeans dropped support for rails. The last version to include rails is
6.9.1. It is slightly buggy, but I use it all the time.
--
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
class Foo
Bar = 10
end # => 10
Foo::Bar # => 10
Foo::Bar.class #=> Fixnum
Bar.class
NameError: uninitialized constant Object::Bar
from (irb):6
from /usr/local/ruby-1.9.2/bin/irb:12:in `'
On Tuesday, August 27, 2013 6:20:07 AM UTC-4, Ruby-Forum.com User wrote:
>
> Here is my sampl
This code needs to be refactored. It is way too long. Many lines are too
long.
--
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+unsubs
Solved. Pilot error.
--
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
I'm finding I can reproduce the problem from 'rails server', so it has
nothing to do with cucumber.
--
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 rubyo
How can this be???
I have two cucumber scenarios. Both work individually, but when I put @wip
in front of both of them, the first succeeds and the second one fails. I
switched the order in the feature file and still the first succeeds and the
second one fails. The error is:
No route matches
Write a loop that generates the desired indexes and then reference arr:
(0..5).each do |j|
i = 10*j
puts "#{arr[i]} at #{i}"
end
Your example output does not match the code. It does not include 0, 20,
and 40.
On Thursday, May 23, 2013 5:24:36 AM UTC-4, Ruby-Forum.com User wrote:
>
> Can an
The usual way to start webrick in RoR is with the command:
$ rails s
and the usual way to stop it is to enter CTRL-C in the same window.
On Monday, April 29, 2013 11:05:51 PM UTC-4, Ruby-Forum.com User wrote:
>
> Tom wrote in post #109027:
>
> ...
>
> > I usually do this:
>
> > ps aux | grep
You can execute SQL statements in a rails application with the command:
ActiveRecord::Base.connection.execute('your sql')
http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/DatabaseStatements.html#method-i-execute
On Sunday, April 28, 2013 7:31:41 AM UTC-4, Anton Kanter wrote:
>
You did not say how this is being displayed. If it is being displayed on a
web page, new lines are always discarded. You need to use '' instead
of '\n'.
On Wednesday, April 10, 2013 4:29:11 AM UTC-4, Erwin wrote:
>
> it's weird, as yaml doc stating it should work :
>
> en:
>> site_under_main
s? why didnt the tests see
> the difference on the database when using MySQL?
>
> On Thursday, 14 March 2013 18:46:23 UTC+1, jsnark wrote:
>>
>> I run the tests using:
>>
>> $ bundle exec cucumber
>>
>> It is my understanding that cucumber is built on top of
solated as possible, so your next test shouldnt
> depend on if the one before fails or passes and what does on the database.
>
> On Wednesday, 13 March 2013 15:14:53 UTC+1, jsnark wrote:
>>
>> I have a rails 3.0 application with complicated logic and was finding
>> that ch
I have a rails 3.0 application with complicated logic and was finding that
changes to fix a bug would introduce another bug elsewhere. I needed an
automatic regression test tool so I could quickly know if this happened. I
am using cucumber for this. I know that I am not doing BDD or TDD, but
On 30 January 2013 18:57, jsnark > wrote:
> > Ever since I upgraded my applications to rails 3.0.19 due to the
> security
> > issue with older versions, exception notification has stopped working.
> What
> > is the fix for this problem? Thank you.
> >
> &g
Ever since I upgraded my applications to rails 3.0.19 due to the security
issue with older versions, exception notification has stopped working.
What is the fix for this problem? Thank you.
Rendered
/var/www/rails/xxx/shared/bundle/ruby/1.9.1/gems/exception_notification-3.0.0/lib/exception_no
On Monday, July 30, 2012 6:40:51 PM UTC-4, pavling wrote:
>
> On 30 July 2012 22:39, jsnark wrote:
> > I understand the problem now, but I do not see the solution. The model
> has
> > a before_save filter that is causing the password to be reset. How do I
>
On Monday, July 30, 2012 4:07:20 PM UTC-4, pavling wrote:
>
> On 30 July 2012 20:23, jsnark wrote:
> > The hash does not contain a password key/value pair. In spite of this,
> the
> > password is set to the empty string.
>
> What filters run in the model? What obs
On Monday, July 30, 2012 2:39:22 PM UTC-4, pavling wrote:
>
>
> On 30 Jul 2012 18:14, "jsnark" wrote:
> >
> > I have a database table that contains encrypted passwords along with
> other information relating to users. When I do an update_attributes
> o
I have a database table that contains encrypted passwords along with other
information relating to users. When I do an update_attributes operation on
a row in the table with a hash that does not contain a password, the
password gets reset to the empty string. How can I stop this?
--
You rece
The message says that enewsletter.publication_date is nil. Check the
database to make sure that all instances have a valid date for this field.
you should add a validation to the model to prevent creating a row with a
nil value.
On Tuesday, June 26, 2012 8:33:31 AM UTC-4, yatta20 wrote:
>
> H
Check out
http://code.google.com/p/rubycas-server/
and
http://code.google.com/p/rubycas-client/
On Tuesday, May 8, 2012 4:03:15 AM UTC-4, honey ruby wrote:
>
> hi all i am trying to implement SSO in ruby on rails site . is there
> any chance to implement SSO .
> kindly help out
>
> Thanks
Old:
string.grep(/re/)
New:
string =~ /re/
On Apr 19, 6:00 pm, Loren wrote:
> Hi,
>
> I am new to ruby and to programming in general.
> I am learning from an outdated book and just realized that the .grip
> method can no longer be used on strings since ruby 1.9.
>
> My question is could you plea
I also had to replace say_when.js.rjs with
say_when.js.erb:
$('#time_div').html('The time is <%= DateTime.now.to_s %> ')
On Apr 12, 11:47 am, jsnark wrote:
> Solved my own problem. The link_to should be:
>
> <%= link_to( "click here", {:action=
Solved my own problem. The link_to should be:
<%= link_to( "click here", {:action=> 'say_when', :format
=> :js}, :remote => true, :method => :post ) %>
--
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
I am running Rails 3.0.7 with Ruby 1.9.2 and using jquery. I ran
$ rails generate jquery:install
to get the right javascript files for AJAX.
HTML:
<%= javascript_include_tag :all %>
...
I don't have the time, but
<%= link_to( "click here", :action=> 'say_when', :remote =>
true, :format =>
That's because sqlite3 is a database server and not a web server.
$ rails server
starts the default web server, WEBrick. Mongrel and thin are some
common alternatives.
On Mar 5, 1:25 am, Gjaldon wrote:
> Hi all,
>
> Need some help with setting my rails server as sqlite3. I'm currently
> follow
I found the solution. Insert the line:
require "bundler/capistrano"
into deploy.rb
On Jan 17, 8:52 am, jsnark wrote:
> Could not find net-ssh-2.2.2 in any of the sources
> (Bundler::GemNotFound)
>
> $ ls -l vendor/cache/net*
> -rw-rw-r-- 1 xxx xxx 27136 2012-01-
e_flags in the
capistrano documentation.
On Jan 17, 6:00 am, Xuan wrote:
> On 16 ene, 15:54, jsnark wrote:
>
> > Oops. Pilot error.
>
> > set :bundle_flags, '--local'
>
> > did not work.
>
> > On Jan 16, 9:43 am, jsnark wrote:
>
> Usual
asier.
On Jan 16, 11:48 pm, Aline de Oliveira Freitas
wrote:
> just for me to get it.. why did you separeted in mini apps in the first
> place? What motivaded you? What were the reasons that led you to do that?
>
> 2012/1/16 jsnark
>
> > What additional information do you nee
What additional information do you need? What are the tradeoffs?
--
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
rubyo
Oops. Pilot error.
set :bundle_flags, '--local'
did not work.
On Jan 16, 9:43 am, jsnark wrote:
> On Jan 16, 9:25 am, Xuan wrote:
>
> > If you add '--local' to your 'set :bundle_flags' statement, capistrano
> > will automatically look into
On Jan 16, 9:25 am, Xuan wrote:
> If you add '--local' to your 'set :bundle_flags' statement, capistrano
> will automatically look into vendor/cache for the gems during the
> deploy process without extra work.
> They should be previously packaged with bundle package.
Thank you. That's what I
I have about 20 relatively small applications running on the server.
They mostly access the same database tables. Is it more efficient to
combine them into a single application with lots of controllers or to
keep them as separate applications.
ruby 1.9.2
rails 3.0.1
capistrano 2.9.0
passenger 3.0
On Jan 13, 3:39 pm, "Steven F." wrote:
> Where did you run "bundle install --path vendor/cache"? On the
> development machine, or the server?
I ran the bundle install command on the server after deploying the
application.
> Has there been any progress with a work-around?
No. Based on your
On Jan 11, 2:52 pm, Colin Law wrote:
> So the question is, what is the difference between
> bundle pack
> and
> bundle install --path vendor/cache
>
> Colin
I found the pack command in "Agile Web Development with Rails", fourth
edition on page 235. I stumbled across the install command while
On Jan 11, 11:55 am, Colin Law wrote:
> Because that is what bundle install is for, to install the appropriate
> gems as defined by Gemfile and gemfile.lock.
> The one thing I am not sure of is why it did not work when the gems
> were already in vendor/cache. How did you get them there in the
Correction. I'm actually running rails v3.0.7.
--
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+unsubs
I am using capistrano v2.9.0 to deploy to a ubuntu server running
apache v2.2.12, passenger v3.0.4, ruby v1.9.2 and rails v3.0.1. When
I deploy a new application, I often get error messages like:
Could not find net-ssh-2.2.2 in any of the sources
(Bundler::GemNotFound)
The missing gem is actuall
It depends.
If the strings are entered by the user you should stay away from using
html_safe because you open your application to html injection attacks.
If the strings come from a trusted source, it is OK to use html_safe.
On Dec 18, 5:50 pm, Linus Pettersson
wrote:
> Hi!
>
> I'm importing lot
Fred,
Thank you so very much for your response.
If I am understanding you correctly, you are confirming my conclusion
that the only way to use temporary tables with sqlite3 and mysql is to
use raw SQL.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails:
It's now been a month since I made this post and have not received a
response.
I am assuming that is because the only way to use temporary database
tables from Ruby is to write raw SQL.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To
I'm running Ruby 1.9.2 and Rails 3.0.7. I'm having problems inserting
data into a temporary database table.
I can create a temporary table with the code:
class TempHelper
def self.create_temp
begin
ActiveRecord::Schema.define do
create_table (:temps), :temporary => true do |t
65 matches
Mail list logo