Search Results

Search found 9437 results on 378 pages for 'rails newbie'.

Page 24/378 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • Compass Rails 3.0 working with 'compass watch' but not without

    - by Mike Blyth
    I'm trying Compass with Rails 3.0.7, just trying to get started. Using gem compass-rails. If I put my sass file in app/assets/stylesheets and run 'compass watch', everything works ok: the compiled css is put into public/stylesheets. However, if I stop 'watch' and rely on Rails to do the compilation, it does not work. Instead, the program looks at the public/stylesheets/sass folder for the input. Furthermore, if a file in that folder has the '@include "compass"' directive, I get an error that the file is not found. How do I force Rails to look in the right place -- app/assets/stylesheets?

    Read the article

  • XML Schema (XSD) to Rails ActiveRecord Mapping?

    - by Incomethax
    I'm looking for a way to convert an XML Schema definition file into an ActiveRecord modeled database. Does anyone know of a tool that happens to do this? So far the best way I've found is to first load the XSD into an RDBMS like postgres or mysql and then have rails connect to do a rake db:schema:dump. This however, only leaves me with a database without rails Models. What would be the best way to import/load this xsd based database into rails?

    Read the article

  • Do ruby on rails programmers refactor?

    - by JoaoHornburg
    I'm a Java programmer who started programming Ruby on Rails one year ago. I like the language, rails itself and the principles behind them. But something that bothers me is that Ruby programmers don't seem to refactor. I noticed that there is a big lack of tools for refactoring in Ruby / Rails. Some IDE's, like Aptana and RubyMine seem to offer some very basic refactoring, but nothing really big compared to Eclipse's Java refactorings. Then there is another fact: most railers (even the pros) prefer some lightweight editors, like VIM or TextMate, instead of IDEs. Well, with these tools you just get zero refactoring (only regex with find/replace). This leaves me this impression that rails programmers don't refactor. It might be just a false impression, of course, but I would like to hear the opinion of people who work professionally with ruby on rails. Do you refactor? If you do, how do you do it,with which tools? If not, why not?

    Read the article

  • TextMate tips for Rails Development

    - by Ganesh Shankar
    Working on Rails code for a bit has started me on the spiral into obsessively customising my dev environment (I say obsessive as at the last Rails meetup I went to there was some guy who was raving about shaving milliseconds off each line of code and therefore upto half an hour a day... I hope I don't become that guy...) I spend most of my time in TextMate so it seemed like a great place to start the optimising... So far I've added a few TextMate bundles like Git Bundle, Project Plus and the theme from Railscasts. I've noticed some of the other TextMate users I've come into contact with using heaps of nifty keyboard shortcuts and other plugins to help make their dev environment more friendly. Looking around the net, I was a bit overwhelmed by the amount of shortcuts and plugins available... So I was hoping to hear from other Rails developers out there: What are some good keyboard shortcuts and plugins that I should be aware of for TextMate with specific reference to Rails Development? I've read this question on SO: http://stackoverflow.com/questions/99807/what-are-some-useful-textmate-shortcuts but I was wondering if there was something a bit more specific to Rails development.

    Read the article

  • Rails app w/ 2.2.0 embedd how to use ruby 1.8 vice 1.9

    - by Barb
    Hello all, I have just downloaded an app that is based on Rail 2.2.0 which is included in the app. I have just upgraded to Ruby 1.9 and I still have Ruby 1.8 on my machine. Is there a way I can tell this app to use Ruby 1.8 vice 1.9? Would it be easier to decouple the app from Rails 2.2.0 and upgrade it to Rails 2.3.6? If changing the rails would be easier, how do I do that?

    Read the article

  • How to validates cyrilic email in Rails 3.1?

    - by iKeler
    Let's say I had the email address like putin-crab@?????????.?? How to validate that address in rails 3.1? My Model(i use Mongoid): #encoding: utf-8 class User include Mongoid::Document field :email, :type => String validates :email, :presence => true, :format => { :with => RFC822::EMAIL } end For validations reqexp i use gem https://github.com/dim/rfc-822 in rails console (normal email): ruby-1.9.2-p290 :001 > usr = User.new( :email => "[email protected]" ) => #<User _id: 4ec627cf4934db7e4d000001, _type: nil, email: "[email protected]"> ruby-1.9.2-p290 :002 > usr.valid? => true in rails console (fu@#ing email): ruby-1.9.2-p290 :003 > usr = User.new( :email => "putin-crab@?????????.??" ) => #<User _id: 4ec627f44934db7e4d000002, _type: nil, email: "putin-crab@?????????.??"> ruby-1.9.2-p290 :004 > usr.valid? Encoding::CompatibilityError: incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string) from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/activemodel-3.1.1/lib/active_model/validations/format.rb:9:in `=~' from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/activemodel-3.1.1/lib/active_model/validations/format.rb:9:in `!~' from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/activemodel-3.1.1/lib/active_model/validations/format.rb:9:in `validate_each' from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/activemodel-3.1.1/lib/active_model/validator.rb:153:in `block in validate' from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/activemodel-3.1.1/lib/active_model/validator.rb:150:in `each' from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/activemodel-3.1.1/lib/active_model/validator.rb:150:in `validate' from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:302:in `_callback_before_13' from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:404:in `_run_validate_callbacks' from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:81:in `run_callbacks' from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/mongoid-2.3.3/lib/mongoid/callbacks.rb:42:in `block in run_callbacks' from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/mongoid-2.3.3/lib/mongoid/callbacks.rb:67:in `call' from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/mongoid-2.3.3/lib/mongoid/callbacks.rb:67:in `run_cascading_callbacks' from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/mongoid-2.3.3/lib/mongoid/callbacks.rb:41:in `run_callbacks' from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/activemodel-3.1.1/lib/active_model/validations.rb:212:in `run_validations!' from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/activemodel-3.1.1/lib/active_model/validations/callbacks.rb:53:in `block in run_validations!' from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:390:in `_run_validation_callbacks' from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:81:in `run_callbacks' from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/mongoid-2.3.3/lib/mongoid/callbacks.rb:42:in `block in run_callbacks' from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/mongoid-2.3.3/lib/mongoid/callbacks.rb:67:in `call' from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/mongoid-2.3.3/lib/mongoid/callbacks.rb:67:in `run_cascading_callbacks' from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/mongoid-2.3.3/lib/mongoid/callbacks.rb:41:in `run_callbacks' from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/activemodel-3.1.1/lib/active_model/validations/callbacks.rb:53:in `run_validations!' from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/activemodel-3.1.1/lib/active_model/validations.rb:179:in `valid?' from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/mongoid-2.3.3/lib/mongoid/validations.rb:70:in `valid?' from (irb):4 from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/railties-3.1.1/lib/rails/commands/console.rb:45:in `start' from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/railties-3.1.1/lib/rails/commands/console.rb:8:in `start' from /home/username/.rvm/gems/ruby-1.9.2-p290@rail31/gems/railties-3.1.1/lib/rails/commands.rb:40:in `<top (required)>' from script/rails:6:in `require'

    Read the article

  • Rails web app authenticated with windows

    - by deostroll
    Is it possible for a rails web application to make use of the windows authentication features in its code. I am looking at being able to obtain the user's login name and domain in the application. But there is a catch. This particular web application runs off an apache web server hosted on a linux machine which is kind of networked to other windows machines. Is all of this possible?

    Read the article

  • rake db:migrate gives a uninitialized class variable @@configuration in Rails error

    - by PK
    uninitialized class variable @@configuration in Rails /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:19:in `configuration' /usr/lib/ruby/gems/1.8/gems/thoughtbot-factory_girl-1.2.2/lib/factory_girl.rb:24 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require' This is the initial part of the enviroment.rb: RAILS_GEM_VERSION = '2.1.0' unless defined? RAILS_GEM_VERSION require File.join(File.dirname(__FILE__), 'boot') Rails::Initializer.run do |config| config.gem "oauth", :version => "0.2.7", :lib => "oauth"

    Read the article

  • Run Rails server on client's local machine for single tenancy [on hold]

    - by rigyt
    We are building a Rails application for a client that wants to run the app locally to be close to their data center for best performance. I had assumed we would use a standard web host. What requirements should we demand of the client's infrastructure..all I can think of so far is remote access for developers and a Linux machine? We don't have server admin expertise so would need to contract this, I doubt the client has the expertise. Does this sound like a recipe for disastor?!

    Read the article

  • Recording Audio through RTMP/Rails

    - by Lowgain
    I am in the process of building a rails/flex application which requires audio to be recorded and then stored in our amazon s3 account. I have found no alternative to using some form of RTMP server for recording audio through flash, but our hosting environment will not allow us to install anything like FMS, Red5, etc. Is there any existing Ruby/Rails RTMP solution that will allow audio recording? If not, is it possible for Rails to at least intercept the RTMP stream and then I can hope to reference red5 or something for parsing the data (long shot, I know)? The other alternative I can think of is hosting a red5 server on another host and communicating with our rails app once the saving/uploading is done, which is not preferred. Am I going to have any luck here?

    Read the article

  • rails application on production not working

    - by Steven
    i have a rails application on production which is running using mongrel, I can successfully start the mogrel for the application but when i try to access the application on the URL it is not responding... it is just hanging. This is the mongrel log... but when I hit xxx.xxx.xxx.xx:3001 it is not showing the website but on developent is working fine. ** Starting Mongrel listening at 0.0.0.0:3001 ** Initiating groups for "name.co.za":"name.co.za". ** Changing group to "name.co.za". ** Changing user to "name.co.za". ** Starting Rails with production environment... ** Rails loaded. ** Loading any Rails specific GemPlugins ** Signals ready. TERM = stop. USR2 = restart. INT = stop (no restart). ** Rails signals registered. HUP = reload (without restart). It might not work well. ** Mongrel 1.1.5 available at 0.0.0.0:3001 ** Writing PID file to /home/name.co.za/shared/log/mongrel.pid

    Read the article

  • ruby on rails gitorious setup on ubuntu

    - by dogmatic69
    Ive been trying to install gitorious for a while now which required ruby and rails etc. Ive finally got rails pages serving but cant finish the installation of gitorious because the gem version is too new. the error logs say please run 'rake ultrasphinx:configure' and that gives rake ultrasphinx:configure (in /var/www/apps/gitorious) rake aborted! uninitialized constant ActiveSupport::Dependencies::Mutex /var/www/apps/gitorious/Rakefile:10:in `require' (See full trace by running task with --trace) From searching google this is beacuse of the wrong gem verison. Cant find a way to down grade it. apparently sudo gem update --system 1.4.2 should do the trick but ubuntu 10.10 does not like this. ERROR: While executing gem ... (RuntimeError) gem update --system is disabled on Debian, because it will overwrite the content of the rubygems Debian package, and might break your Debian system in subtle ways. The Debian-supported way to update rubygems is through apt-get, using Debian official repositories. If you really know what you are doing, you can still update rubygems by setting the REALLY_GEM_UPDATE_SYSTEM environment variable, but please remember that this is completely unsupported by Debian. So i added export REALLY_GEM_UPDATE_SYSTEM=1 to .bashrc and reloaded it with . ~/.bashrc and still the same. ive tried various forms of setting this environmental variable with no luck. Ive also been told on #gitorious irc channel to add the file config/initializers/rubygems.rb with the line require "thread" to it. This has done nothing. EDIT: Just found another way which was rvm install rubygems 1.4.2 and it gave: Removing old Rubygems files... Installing rubygems dedicated to ruby-1.8.7-p334... Retrieving rubygems-1.4.2 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 288k 100 288k 0 0 282k 0 0:00:01 0:00:01 --:--:-- 414k Extracting rubygems-1.4.2 ... Installing rubygems for /home/ubuntu/.rvm/rubies/ruby-1.8.7-p334/bin/ruby ERROR: Error running 'GEM_PATH="/home/ubuntu/.rvm/gems/ruby-1.8.7-p334:/home/ubuntu/.rvm/gems/ruby-1.8.7-p334@global:/home/ubuntu/.rvm/gems/ruby-1.8.7-p334@global" GEM_HOME="/home/ubuntu/.rvm/gems/ruby-1.8.7-p334" "/home/ubuntu/.rvm/rubies/ruby-1.8.7-p334/bin/ruby" "/home/ubuntu/.rvm/src/rubygems-1.4.2/setup.rb"', please read /home/ubuntu/.rvm/log/ruby-1.8.7-p334/rubygems.install.log WARN: Installation of rubygems did not complete successfully. TL;DR please tell me how to downgrade rubygems on ubuntu 10.10 or upgrade gitorious to work with 1.6.2 gems

    Read the article

  • Ruby on Rails: Accessing production database data for testing

    - by williamjones
    With Ruby on Rails, is there a way for me to dump my production database into a form that the test part of Rails can access? I'm thinking either a way to turn the production database into fixtures, or else a way to migrate data from the production database into the test database that will not get routinely cleared out by Rails. I'd like to use this data for a variety of tests, but foremost in my mind is using real data with the performance tests, so that I can get a realistic understanding of load times.

    Read the article

  • Linking to external file in Ruby on Rails

    - by Maestro1024
    Linking to external file in Ruby on Rails I have a file I want to share as a link in my rails app. I create a link to it in the .erb file like this <li><a href="somefile.pdf">Some File</a> </li> When I select the link I get the following error. Routing Error No route matches "/pages/somefile.pdf" with {:method=:get} Do I really need a route for this? I really just want the save as dialog to popup. Just a link to a file that the user can open or download. What is the rails way to do this (rails newbie here)?

    Read the article

  • Ruby on rails active-record generated SQL on Postgres

    - by jpartogi
    Dear all, Why does Ruby on rails generated more queries in the background on Postgres than MySQL? I haven't tried deploying Rails on production with Postgres yet, but I am just afraid this generated queries would affect the performance. Do you find Rails with Postgres is slower than MySQL, knowing that it produce more query on the background? Or it is relatively the same?

    Read the article

  • Why is RSpec so slow under Rails?

    - by Adrian Dunston
    Whenever I run rspec tests for my Rails application it takes forever and a day of overhead before it actually starts running tests. Why is rspec so slow? Is there a way to speed up Rails' initial load or single out the part of my Rails app I need (e.g. ActiveRecord stuff only) so it doesn't load absolutely everything to run a few tests?

    Read the article

  • emacs-rails vs rinari??

    - by nimms
    Hi all, I'm just coming back to rails coding after a long hiatus. I was using rinari previously but noticed that there's a new version of emacs-rails. Is anyone using either?? Any preferences for one over the other?? What are people using for their rails projects within emacs these days??

    Read the article

  • Switching/Linking to another external stylesheet in a .js file using Ruby on Rails

    - by Jake
    Im learning JQuery from a Sitepoint Book but Im trying to apply all the lessons to a Rails App. In one lesson, we are taught how to switch to a different stylesheet if the browser window is resized beyond a certain point. Here's the javascript code: if ($('body').width() > 900) { $('<link rel="stylesheet" href="wide.css" type="text/css" />') .appendTo('head'); } else { $('link[href=wide.css]').remove(); } Rails doesn't seem to want to link to the new stylesheet using 'link rel'. I've tried using the Rails helper: <%= stylesheet_link_tag 'base', :media => 'screen' %> but that doesn't work in a .js file. How do I link to an external stylesheet in a .js file using Ruby? Can I use Ruby on Rails code in a .js file? Thanks.

    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

  • Monitor database table for external changes from within Rails application

    - by jhwist
    I'm integrating some non-rails-model tables in my Rails application. Everything works out very nicely, the way I set up the model is: class Change < ActiveRecord::Base establish_connection(ActiveRecord::Base.configurations["otherdb_#{RAILS_ENV}"]) set_table_name "change" end This way I can use the Change model for all existing records with find etc. Now I'd like to run some sort of notification, when a record is added to the table. Since the model never gets created via Change.new and Change.save using ActiveRecord::Observer is not an option. Is there any way I can get some of my Rails code to be executed, whenever a new record is added? I looked at delayed_job but can't quite get my head around, how to set that up. I imagine it evolves around a cron-job, that selects all rows that where created since the job last ran and then calls the respective Rails code for each row.

    Read the article

  • New Rails deployment half working...not sure why?

    - by Meltemi
    I'm in the final stages of going round trip through the entire Rails cycle: development - test - production (on an external server). I'm very close...but seeing some errors with the production version and don't know enough about Rails' "magic" to troubleshoot it yet... all seems well and I can load my app by going to www.mydomain.com/rails and it seems to work...I can interact with my app and create new objects in my database. However, when I go to www.mydomain.com/rails/ (difference is the trailing slash) i get a webpage that just says "Index from public" on it?!? I don't know where that's coming from? index.html is long removed from public. this may or may not be related to why I can't access, say, the first record in one of my classes by calling its controller like so: www.mydomain.com/rails/mycontroller/1 . and yes, there are records in the database. anyway, something's askew. it works fine on development box. but, only half working on production server. anyone know what might be causing this? this app is running on the server box (not development) Installed Passenger on server to serve app via Apache modified my httpd.conf with Passenger's stuff (headache but finally got it to respond) loaded schema into the production database: rake db:schema:load RAILS_ENV=production

    Read the article

  • Using WAMP's MySQL with Cygwin Ruby on Rails

    - by Andrei
    I'm trying to install a Rails app on a Cygwin Rails + WAMP MySQL setup, but rake trows an error : Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) Of course, it's trying to connect to MySQL trought a Cygwin socket, and since there's no MySQL server running on Cygwin, it fails. How do I get Rails to connect to WAMP's MySQL (perhaps through TCP/IP instead of a socket) ?

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >