Displaying 20 results from an estimated 4000 matches similar to: "Is require_dependency supposed to be a public API?"
2012 Jun 07
3
Couldn't reload a module when it's changed. Tried :require_dependency, :watchable_dirs, :unloadable
I''m completely messed with module reloading in development mode. I have
to restart app server each time I edit lib/z/nginx.rb which is included
in app/models/user_case.rb
app/models/user_case.rb
require_dependency ''z/nginx''
class UserCase < ActiveRecord::Base
include Z::Nginx
unloadable
I added to environment.rb
2011 Mar 04
8
rake issues
Is there any reason why db:setup and db:reset don''t show any more on
"rake -T db"?
I guess any rake task that is defined only as a group of other tasks
(without any ruby blocks attached) presents this problem.
Also let me write this as a remember note to myself for when I have some
time: the Rails Guides on Migrations should be updated to include
instructions about db:load
2013 Feb 27
4
My SCSS compiled CSS lacks "/assets" in the generated urls
Running "rake assets:clobber assets:precompile" will generate files like
"application-xxx.css" with incorrect urls after upgrading to Rails 4.
For example url(/fields/xxx.png) when it should be
url(/assets/fields/xxx.png). For some unknown reason it worked once in
development mode, but after running rake assets:clobber I can''t get it
to work again...
Any ideas
2011 Nov 28
29
Lack of foreign-key constraints support in ActiveRecord
Is there any reason why AR has never supported foreign-key constraints?
I can understand the lack of support for triggers and stored procedures
since they are highly dependent on the database to create a wrap API
around them. But this is not the case for foreign keys.
This is specially important for open-source projects like
Redmine/Chiliproject and Gitorious where you shouldn''t be
2010 May 08
19
mb_chars.upcase and Ruby 1.9.2
I''m testing ruby-head through rvm but can''t get ''ação''.mb_chars.upcase
== ''AÇÃO''... I get ''AçãO'' instead...
This happens both for Rails 2.3.5 and Rails 3 beta 3...
How can I get upcase to work correctly?
Thanks in advance,
Rodrigo.
--
You received this message because you are subscribed to the Google Groups "Ruby
2010 May 10
6
feedback on a few ActiveSupport::Multibyte patches
Hi all,
In response to Rodrigo Rosas''s message about mb_chars.upcase not
giving the expected result on 1.9, I''ve done some work in a fork to
make String#mb_chars always return an instance of a proxy class, both
with Ruby 1.8 and Ruby 1.9. The end result of the patch is
(hopefully) to make Rails'' multibyte functionality behave the same way
in 1.8.7 and 1.9.x.
2012 Apr 27
3
rails console --sandbox is only half-baked
Recently I''ve found out some mentions to the "--sandbox" parameter to
the "rails console" command.
And I found the idea interesting, but since I''m using Sequel instead of
ActiveRecord I guessed this wouldn''t work for me.
But after talking about this subject in the Sequel mailing list, Jeremy
Evans has brought to my attention that there are some
2010 Jul 24
23
How to disable ORM in Rails 3
Is there any way to prevent Rails 3 from using an ORM? In Rails 2, it
used to have a description in environments.rb explaining how to do that.
In Rails 3, is there any way to tell it to not use any database? I was
trying to make some benchmarks from situations that don''t require a
database...
Thanks in advance,
Rodrigo.
--
You received this message because you are subscribed to
2010 Jul 08
25
Prepared SQL statements
Dear all great developers.
I wonder if there is any work being done or thoughts being shared
regarding prepared SQL statements.
Currently I am in heavy need of tuning SQL INSERTS that insert large
(3MB) images into blobs.
I am using rails 2.3.5 with postgres adapter and pg driver.
Any information would be appreciated.
Jarl
--
You received this message because you are subscribed to the
2012 May 18
2
How does Spork help in requests specs?
Even with Spork, my requests specs are very slow to start running (about
7 seconds).
I suspect Rails is booting each time I run "rspec -X spec/requests".
Is that true? If so, is there any way I could instruct the web server to
keep alive after the specs run so that it would be faster on next run?
Are there any resources on how to have better performance on running
requests specs
2012 May 11
14
What is the point of using :format in routes?
Today I had a strange behavior that made me suspect of jQuery at first,
but then it happened that I''ve faced two gotchas, one from CoffeeScript
and one from Rails itself.
I have something like this:
routes.rb
post ''/fields/:id.:format'' => ''fields#show'', as: :field,
constraints: {id: /\d+/}
post ''/fields/remove/:id''
2013 Feb 26
5
Can't upgrade to 4 beta 1
I had to update several gems for Bundler to accept it but now I''m stuck:
bundle update rails devise knockoutjs-rails sass-rails coffee-rails
devise-encryptable oojs
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "railties":
In Gemfile:
2012 Oct 18
3
Issues upgrading RSpec
My specs work fine with this in my Gemfile.lock:
grep rspec Gemfile.lock
rspec (2.11.0)
rspec-core (~> 2.11.0)
rspec-expectations (~> 2.11.0)
rspec-mocks (~> 2.11.0)
rspec-core (2.11.0)
rspec-expectations (2.11.1)
rspec-mocks (2.11.1)
rspec-rails (2.11.0)
rspec (~> 2.11.0)
rspec-rails (~> 2.11)
After "bundle update
2005 Sep 27
5
Am I misunderstanding "require_dependency"?
Hi
From what I understand about documentation about require_dependency,
this function will work like require but the file will be reloaded on
every request to the server when in development mode.
I have bootstrapped am minimal RoR project with 0.13.1 Rails. I have
created a minimal Controller and hooked up it''s "index" action at the
site root. I have also created a
2013 Feb 18
13
Correct Use or Naming of Migrations
Hi Folks,
There is much discussion where I work at present regarding migrations, and
the ''correct'' usage or not of them.
TL;DR
Should migrations be used just to modify schema, and other ''deploy'' tasks
done other ways? If yes, how to ensure no repeat runs of such tasks
(seeds, jobs etc)
Background
Once you''re live there are often additional things
2011 Mar 29
18
Rails 3.0.6.rc1
ZOMG HAPPY TUESDAY (UTC-7)!!! <3<3<3<3<3
I am happy to announce that the first release candidate for Rails 3.0.6 has
been pushed to rubygems.org.
## Release Candidate: What does it mean?
The release candidate is very similar to what we will actually release for
version 3.0.6. The reason that we release an RC is so that the community can
have a chance to postpone or veto commits
2012 Jul 12
1
engines: accessing classes from the hosting-apps lib
I have an engine and can access model-classes of the hosting app without
any troubles.
But when I try to access classes that are defined in the lib-directory of
the hosting app, they are not found and I get a
uninitialized constant Redmine
where Redmine is a module defined in the lib-directory of the hosting app.
The lib-directory has added this dir to the autoload_paths, but the engine
2006 Aug 10
6
Migrations suddenly broken: undefined method autoload_paths
I really need some help here because I am at a loss. I have been using
migrations just fine now for a while and I suddenly started getting a
very bizarre error when migrations are run:
undefined method `autoload_paths='' for Dependencies:Module
I have tried rolling back my application code, and rolling back the
rails edge revision I am running but neither seem to help.
I have
2007 Nov 28
8
include vs. require vs. require_dependency
i am struggling a bit with all of them .. could someone be so nice a
describe me the exact differences, pros & cons of all of them ... thx a
lot!
--
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
2010 Sep 02
5
Re: Exclude ActiveRecord in Rails3
What''s the best way to exclude ActiveRecord in Rails3?
In Rails2, one could just do:
*config.frameworks -= [ :active_record ]*
in the configuration block in environment.rb. Is it possible in Rails3?
Thanks.
Anuj
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To post to this group, send email to