Displaying 20 results from an estimated 40000 matches similar to: "RE: Different rails environment"
2008 Apr 15
2
environment.rb uninitialized constant when starting console
I have the following code in environment.rb:
require File.join(File.dirname(__FILE__), ''boot'')
raw_config = File.read(RAILS_ROOT + "/config/config.yml")
APP_CONFIG = YAML.load(raw_config)[RAILS_ENV]
This works fine when running the server, but if I try and start a
console I get:
Loading development environment.
2006 Jan 14
5
New problem with Mac OS X + rails + mysql. Please help!
All,
I am working through the ''depot'' sample application from the
"Pragmatic Programmers" book on my
powerbook. I was going through the install process on
http://hivelogic.com/articles/2005/12/01/
ruby_rails_lighttpd_mysql_tiger and it seemed to work fine.
But when I try to create the first table, I get the following error,
and I have no idea what this means.
Any
2007 Dec 08
3
Multiple Worker Methods on Different Schedules
Quick question: If I want to schedule different worker methods defined in
the same worker to trigger at different times, is this possible? Would the
following scheduler yaml work?
:schedules:
:foo_worker:
:worker_method: method1
:trigger_args: 0 */10 * * * * *
:job_key: some_key_1
:foo_worker:
:worker_method: method2
:trigger_args: 0 */15 * * * * *
:job_key:
2008 May 04
3
Rails Configuration in Workers
I override some Rails'' configuration options in my project, like:
config.database_configuration_file = "#{RAILS_ROOT}/local/config/
database.yml"
But they aren''t picked up in BackgroundRB because Rails ActiveRecord
is just initialized directly in MasterWorker#load_rails_env:
db_config_file = YAML.load(ERB.new(IO.read("#{RAILS_HOME}/
2006 Jun 20
4
Newbie Question to Get Rolling on Rails
I''m not sure if this is the right place to ask such questions. If not, my
apologies and please direct me where such questions are handled.
I am new to RoR and have been following the tutorial in Agile Web Developement
with Rails. I have successfully gotten RoR up and running on my Mac (OS X
10.4.6) and created a MySQL database. However, on page 57 of the tutorial, the
command
2006 Apr 13
4
Apache/fastcgi setup can''t find custom config/*.yml file!
All,
Apache 2/FastCGI on Linux
My fastcgi config. file is set up to run the "test" RAILS_ENV.
When I go to access a view associated with a particular controller, I
keep getting a ENOENT (file not found) error on a custom config. file
that I am attempting to load.
What I can''t figure out is why it can''t find the file.
Here''s the code that loads it in my
2009 Oct 12
2
yaml ?nodes? or nested maps
I want to iterate ?nodes? and ?leafs? for a yaml document:
thufir@ARRAKIS:~/projects/rss$
thufir@ARRAKIS:~/projects/rss$ ruby user.rb
user.rb:6: undefined method `[]'' for nil:NilClass (NoMethodError)
from user.rb:5:in `each_key''
from user.rb:5
thufir@ARRAKIS:~/projects/rss$
thufir@ARRAKIS:~/projects/rss$ ruby user2.rb
user2.rb:5: undefined method `[]'' for
2006 Jan 29
6
Depot example problem on Slackware
Hello.
I''m new to RoR. I run RoR on my Slackware. I follow the depot example
and have a problem when run the script:
root@localhost:~/work/depot# ruby script/generate scaffold Admin Product
/usr/lib/ruby/1.8/yaml.rb:133:in `load'': syntax error on line 5, col 2:
` socket:/var/run/mysql/mysql.sock'' (ArgumentError)
from /usr/lib/ruby/1.8/yaml.rb:133:in
2006 Apr 27
2
postgresql ruby rails connector ?
Which postgresql gem or library are people using on windowsxp for rails? And what do I
put in the yaml file?
Warren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060427/e68daff3/attachment.html
2011 Feb 06
1
Psych can't load LaTeX entities file
Hi there,
I wanted to use RedCloth with my RubyOnRails 3 application, but it seems
that RoR uses 1.9.2''s Psych by default as the YAML parser if available,
and Psych fails to load the LaTeX entities file:
====================================================================
#ruby -v: ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-linux]
irb(main):001:0> Dir.pwd
=>
2006 Apr 05
3
Rails 1.1 and webrick/mysql problems
i just upgraded to rails 1.1 yesterday and since then i could?nt make it
work with mysql, for example i have my database "todo" and one table
"todos", i create the app and generate the model but when i try to
generate the scaffold with "ruby script/generate scaffold Todo Todo" i
get this error " error Before updating scaffolding from new DB schema,
try
2009 Jun 24
3
I18N: allocator undefined for Proc
Hello all,
I''m trying to translate my application using the I18N feature and it was
working fine until I added a couple of new entries to the en.yml files.
Now in every action in my application I always get the following error:
TypeError in Account#login
Showing app/views/account/login.rhtml where line #2 raised:
allocator undefined for Proc
Extracted source (around line #2):
1:
2:
2011 Jul 06
7
Issue with puppet file serving api not parsing yaml content correctly
I am working on building a facter tag based node classifier similar to
https://github.com/jordansissel/puppet-examples/tree/master/nodeless-puppet/.
However, I have run into an issue where I cannot use puppet''s require
file ability to push the yaml file containing the facts file to the
client because it would require two runs of puppet to pickup changes.
Consequently, I have written into
2007 Dec 30
2
Loading config YAML into merb process for the life of the process
Hey Chaps,
Forgive me for not fully understanding the inner workings of merb, but
I would like to read in a YAML configuration file once when the
application is booted rather than reading it every time it is used (as
presumably the overhead in doing that is significant?) - I had
presumed this is how both Merb and rails do it for there database.yml
config files (hence its a requirement
2008 Jan 18
2
NameError when using alias_method -- but method exists?
Hello Rubyists,
I am a bit stumped here. I want to extend the ''load_file'' method in the
YAML module. Following along with the PickAxe example of making old
methods do new things, I try this in irb:
>> module YAML
>> alias_method :orig_load_f, :load_file
>> def load_file(*args)
>> contents = orig_load_f(*args)
>>
2007 Oct 08
5
Escaping colons in YAML
Hello,
Does anyone know how to escape colons in YAML? The key in my yml is the
domain with port number, but the yml file isn''t working with this setup:
###BEGIN
production:
### THIS IS THE ONE I''m HAVING TROUBLE WITH ###
8.11.32.120:8000: GoogleMapsKeyforThisDomain
exampledomain.com: GoogleMapsAPIKeyforThatDomain
development:
GoogleMapsAPIKeyforDevelopmentDomain
###END
2010 Jul 22
8
Foreman / External Nodes -- Node Not found
Hello All,
So I finally got around to start to cut over node definitions
from standard flat files to external nodes (foreman), and getting
error message: "Error 400 on SERVER: Could not find node ''nodename'';
cannot compile" - So basically it can''t pick up the node from the
external node config.
When I test the fetching of the yaml file it seems to work
2010 Aug 12
3
script/server problem/...
root@essc-openvpn:/websites/teambox.mydomain.com/teambox# sudo script/
server -e development
/usr/lib/ruby/gems/1.8/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:
132: warning: Insecure world writable dir /usr/bin in PATH, mode
040777
=> Booting Mongrel
=> Rails 2.3.8 application starting on http://0.0.0.0:3000
/usr/lib/ruby/1.8/yaml.rb:133:in `load'': syntax error on line 6, col
2:
2006 Jul 10
1
rake db:fixtures:load FIXTURES=xyz
I am attempting to do selective fixture loading against my test
database.
When I run
rake db:fixtures:load FIXTURES=DataSetInfo
I get no output. (A full trace is below). I''m trying to figure out why
nothing happens.
1) Does the command above attempt to operate against my test database?
2) DataSetInfo is the name of my table and the name of my yml file
I generated these YAML
2010 Jul 28
1
Problem loading YAML files and using pluralize method in Rails3rc
Hi,
I just upgraded my rails app from rails3.0.0beta4 to rails3.0.0rc and
I''m having problems loading a yaml file. I have a load_config.rb in
the initializers folder which loads a yaml file. The basic loading
code is:
FACEBOOK_CONFIG = YAML.load_file(File.join(Rails.root, ''config'',
''facebooker.yml''))[RAILS_ENV]
This stopped working when I moved to