Search Results

Search found 248 results on 10 pages for 'yml'.

Page 5/10 | < Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >

  • Heroku and i18n Problems

    - by nvano
    i´m having trouble getting i18n to work on heroku. i set: I18n.default_locale = :de in my environment.rb and the translation is in config/locales/de.yml works perfect on my local machines but not so on heroku. on heroku everything is in english. i don´t think i need a special gem like i18n gem, cause i don´t have it on my local machine either. maybe anyone has a solution to this?

    Read the article

  • How do I override generic activerecord error messages in ruby-on-rails?

    - by David Smith
    In my en.yml translation file, I have: activerecord: errors: template: header: one: "1 error prohibited this {{model}} from being saved" other: "{{count}} errors prohibited this {{model}} from being saved" When an activerecord/validation error occurs during logging into my application, the error message: "1 error prohibited this user session from being saved" is displayed (where user_session is the model being used). I'd rather have it say something like "An error has occured to prevent you from logging into your account". How do I override the generic error message with my specific one?

    Read the article

  • XNA Level config file in C#

    - by Midday
    I'm working on as small game for class and was wondering what is a easy way to handel level configuration files. Like object placements , names, etc. I'm new to C# but fluent in Java, Ruby. so XML? YML? text, serialized objects?

    Read the article

  • Is there an easy way to get the hostname in Symfony

    - by greg0ire
    I have been searching for an easy way to get the hostname of the machine where Symfony runs in Symfony (so that my app adapts when it is used on a host with a different ServerName), but I couldn't find one. I created a variable in app.yml and I fetch it, but I still wonder if there is no easier way to do this. How are you doing this? I'm using Symfony 1.2 and 1.4 on different projects.

    Read the article

  • How do I switch Ruby-on-Rails into en-UK

    - by Nick Clarke
    Hi, I'm trying to switch one of my websites into en-UK so that I get the correct date and currency formats etc... I have found this yaml file: http://github.com/mattetti/globalite/blob/master/lang/rails/en-UK.yml Any ideas if there is a better one to use? I also checked here but could not see it: http://github.com/svenfuchs/rails-i18n/tree/master/rails/locale Thanks, Nick

    Read the article

  • multiple log files in symfony

    - by Mike
    I'd like to set up an additional log file in symfony, so that some messages (payment processing in my case) would go to a different file from the rest of symfony. Is it possible? Here's my current log configuration from factories.yml: all: logger: param: level: debug loggers: sf_file_debug: param: level: notice file: /var/log/symfony/%SF_ENVIRONMENT%/%SF_APP%.log

    Read the article

  • Rails send mail with GMail

    - by Danny McClelland
    Hi Everyone, I am on rails 2.3.5 and have the latest Ruby installed and my application is running well, except, GMail emails. I am trying to setup my gmail imap connection which has worked previously but now doesnt want to know. This is my code: # Be sure to restart your server when you modify this file # Uncomment below to force Rails into production mode when # you don't control web/app server and can't set it the proper way # ENV['RAILS_ENV'] ||= 'production' # Specifies gem version of Rails to use when vendor/rails is not present RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION # Bootstrap the Rails environment, frameworks, and default configuration require File.join(File.dirname(__FILE__), 'boot') Rails::Initializer.run do |config| # Gems config.gem "capistrano-ext", :lib => "capistrano" config.gem "configatron" # Make Time.zone default to the specified zone, and make Active Record store time values # in the database in UTC, and return them converted to the specified local zone. config.time_zone = "London" # The internationalization framework can be changed to have another default locale (standard is :en) or more load paths. # All files from config/locales/*.rb,yml are added automatically. # config.i18n.load_path << Dir[File.join(RAILS_ROOT, 'my', 'locales', '*.{rb,yml}')] #config.i18n.default_locale = :de # Your secret key for verifying cookie session data integrity. # If you change this key, all old sessions will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attacks. config.action_controller.session = { :session_key => '_base_session', :secret => '7389ea9180b15f1495a5e73a69a893311f859ccff1ffd0fa2d7ea25fdf1fa324f280e6ba06e3e5ba612e71298d8fbe7f15fd7da2929c45a9c87fe226d2f77347' } config.active_record.observers = :user_observer end ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS.merge!(:default => '%d/%m/%Y') ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge!(:default => '%d/%m/%Y') require "will_paginate" ActionMailer::Base.delivery_method = :smtp ActionMailer::Base.smtp_settings = { :enable_starttls_auto => true, :address => "smtp.gmail.com", :port => 587, :domain => "XXXXXXXX.XXX", :authentication => :plain, :user_name => "XXXXXXXXXX.XXXXXXXXXX.XXX", :password => "XXXXX" } But the above just results in an SMTP auth error in the production log. I have read varied reports of this not working in Rails 2.2.2 but nothing for 2.3.5, anyone got any ideas? Thanks, Danny

    Read the article

  • symfony 1.4: doctrine build model warning

    - by tigerstyle
    Hi volks, I copied my sources from my lokal dev (everything works fine) to my repository and from there I did a checkout on my remote dev. Now when I try to build everything I get this error: devel:/var/www/myproject# ./symfony doc:build-model doctrine generating model classes file+ /tmp/doctrine_schema_48726.yml Warning: file_get_contents(/var/www/myproject/lib/model/doctrine//base/BaseAdvert.class.php): failed to open stream: No such file or directory in /var/www/myproject/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildModelTask.class.php on line 77 Do you know what the problem could be? Thx for your answers :)

    Read the article

  • Whats the significance of creating three db's in ruby and rails.

    - by piemesons
    Hello friends i am moving from php to ruby on rails. Suppose u want to create a application in ruby on rails rails depot -d mysql This will create a application depot with database mysql right..!!! Now config/database.yml has a definition of three databases ie depot_development, depot_test and depot_production under environment development , test and production respectiviely Whats the significance of creating these three databases.. (Please explain considering this is my first day with ruby on rails and i am takin help from Agile Web Development with Rails)

    Read the article

  • Symfony sfMail not delivering emails

    - by Cav
    Hi, somehow sfMail doesn't want to send emails and I can't find the reaseon why. send() simply returns 0, here is my code: $message = $this->getMailer()->compose("[email protected]", "[email protected], "test", "testing"); echo $this->getMailer()->send($message); factories.yml: all: mailer: class: sfMailer param: logging: %SF_LOGGING_ENABLED% charset: %SF_CHARSET% delivery_strategy: realtime transport: class: Swift_SmtpTransport param: host: smtp.email.com port: 25 encryption: ~ username: [email protected] password: mytestpass and I simply get "0" as result. Any ideas what am I doing wrong?

    Read the article

  • Ruby-on-Rails equivalent to ORM Designer for Symfony?

    - by fayer
    In Symfony i just have to create models with ORM Designer and export it to symfony as a schema.yml and then use a symfony command to create tables, models and forms. I wonder if there is an equivalent to the RoR so that you dont have to create models manually by hand? It saves a lot of time using GUI for this kind of tasks and it is less error-prone. thanks

    Read the article

  • Is there an easy way to get the ServerName in Symfony?

    - by greg0ire
    I have been searching for an easy way to get the ServerName of the machine where Symfony runs in Symfony (so that my app adapts when it is used on a host with a different ServerName), but I couldn't find one. I created a variable in app.yml and I fetch it, but I still wonder if there is no easier way to do this. How are you doing this? I'm using Symfony 1.2 and 1.4 on different projects.

    Read the article

  • Deploying to Heroku with sensitive setting information

    - by TK
    I'm using GitHub for code and Heroku for the deployment platform for my rails app. I don't want to have sensitive data under Git. Such data include database file settings (database.yml) and some other files that have secret API keys. When I deploy to heroku, how can I deal with files that are not under revision control. When I use Capistrano, I can write some hook methods, but I don't know what to do with Heroku.

    Read the article

  • How to apply query to model if field not filtered

    - by jdog
    I have a range of modules running on generator.yml. In some of those I would like to hide records by default of Status: CLOSED (being the last of a range of Statuses). OF course if the user filters for CLOSED i want to show these records. I thought it would make sense to apply andWhere('status_id=?',Status::CLOSED) in a specific table_method , but how do I access the filters of the module from within the model? Is there a better way to do this?

    Read the article

  • ruby yaml ypath like xpath ?

    - by gurpal2000
    Hi i have a yaml file like so --- data: - date: "2004-06-11" description: First description - date: "2008-01-12" description: Another descripion How can i do a "ypath" query similar to xpath for xml ? Something like "get the description where the date is 2004-06-11" YAML.parse_file('myfile.yml').select('/data/*/date == 2004-06-11') How do you do it, and if that's possible how can i similarly edit the description by 'ypath' ? Thanks

    Read the article

  • Check directory for files, retrieve first file

    - by Lowgain
    I'm writing a small ruby daemon that I am hoping will do the following: Check if a specific directory has files (in this case, .yml files) If so, take the first file (numerically sorted preferrably), and parse into a hash Do a 'yield', with this hash as the argument What I have right now is like: loop do get_next_in_queue { |s| THINGS } end def get_next_in_queue queue_dir = Dir[File.dirname(__FILE__)+'/../queue'] info = YAML::load_file(queue_dir[0]) #not sure if this works or not yield info end I'd like to make the yield conditional if possible, so it only happens if a file is actually found. Thanks!

    Read the article

  • Ruby - How to write a new file with output from script

    - by Sam
    I have a simple script that does some search and replace. This is basically it: File.open("us_cities.yml", "r+") do |file| while line = file.gets "do find a replace" end "Here I want to write to a new file" end As you can see I want to write a new file with the output. How can I do this?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >