Search Results

Search found 871 results on 35 pages for 'gary rake'.

Page 6/35 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • "rake db:seed" no method error

    - by louddwarf
    when I try and run the "rake db:seed" command the rails console outputs "NoMethodError: undefined method `db' for #" not quite sure what going on. I'm using netbeans to build my rails project which is using the built-in JRuby 1.2 would that have anything to do with it?

    Read the article

  • where can I find the rake tasks delivered with rails

    - by ash34
    I am looking for tasks like tmp:clear or db:migrate. Where can I find the code for these tasks. I remember seeing them before but don't recollect where. Also, is there a way I can set some global variables in a .rake file that can be accessed by all tasks in that file without passing them as arguments to each task. thanks, ash

    Read the article

  • Issues with rake after installing FreeImage on Mac OS X 10.6

    - by Das Ist Nicht
    I am trying to setup my dev environment on my Mac (running Mac OS X 10.6) for my work's rails application. It requires FreeImage and now that I have installed that, I run rake db:migrate and receive the following error: dyld: lazy symbol binding failed: Symbol not found: _FreeImage_SetOutputMessage Referenced from: /Users/username/.ruby_inline/Inline_ImageScience_cdab.bundle Expected in: flat namespace dyld: Symbol not found: _FreeImage_SetOutputMessage Referenced from: /Users/username/.ruby_inline/Inline_ImageScience_cdab.bundle Expected in: flat namespace Trace/BPT trap I have tried searching around for the error but am at a complete loss as to where to go or what to try in order to resolve this issue.

    Read the article

  • RAKE won'tt create xml file

    - by user296507
    hi, i'm a bit lost here as to why my RAKE task will not create the desired XML file, however it works fine when i have the method 'build_xml' in the .RB file. require 'rubygems' require 'nokogiri' require 'open-uri' namespace :xml do desc "xml build test" task :xml_build => :environment do build_xml end end def build_xml #build xml docoument builder = Nokogiri::XML::Builder.new do |xml| xml.root { xml.location { xml.value "test" } } end File.open("test.xml", 'w') {|f| f.write(builder.to_xml) } end

    Read the article

  • rake does not returning anything

    - by CHID
    Hi, I jus created a rails application. I created a model using ruby script/generate model Article next i edited the my articles.rb file by adding these lines in self.up method def self.up create_table :articles do |t| t.string :title t.text :body t.string :published_at t.timestamps end end Now i ran rake db:migrate . But migrate does not work, it simply does no print anything. Anyone knows where i am going wrong?

    Read the article

  • Error happening when running "rake db:create RAILS_ENV='development' "

    - by Dean
    Hi, I am getting this error in my terminal when i execute the command above, Deans-MacBook:depot dean$ rake db:create RAILS_ENV='development' (in /Users/dean/src/RailsBook/depot) Couldn't create database for {"username"=>"root", "adapter"=>"mysql", "database"=>"depot_development", "host"=>"localhost", "password"=>nil}, charset: utf8, collation: utf8_unicode_ci (if you set the charset manually, make sure you have a matching collation) In database config file i have the following: development: adapter: mysql database: depot_development username: root password: host: localhost I have the mysql gem installed and now i am unsure on what to do next. I am running snow leopard on a Macbook. Does anyone know why this error is happening? Thanks in Advance Dean

    Read the article

  • Database not completely updated in rails migration

    - by Aatish Sai
    I am new to Ruby on Rails. I have a migration called create user class CreateUsers < ActiveRecord::Migration def change create_table :users do |t| t.column :username, :string, :limit => 25, :default => "", :null => false t.column :hashed_password, :string, :limit => 40, :default => "", :null => false t.column :first_name, :string, :limit => 25, :default => "", :null => false t.column :last_name, :string, :limit => 40, :default => "", :null => false t.column :email, :string, :limit => 50, :default => "", :null => false t.column :display_name, :string, :limit => 25, :default => "", :null => false t.column :user_level, :integer, :limit => 3, :default => 0, :null => false end User.create(:username=>'test',:hashed_password=>'test',:first_name=>'test',:last_name=>'test',:email=>'[email protected]',:display_name=> 'test',:user_level=>9) end end When I run rake db:migrate the table is created with the columns as mentioned above but the test data are not there mysql>select * from users; Empty set (0.00 sec) EDIT I just dropped the whole database and restarted the migration and now it is showing the following error. rake aborted! An error has occurred, all later migrations canceled: Can't mass-assign protected attributes: username, hashed_password, first_name, last_name, email, display_name, user_level What am I doing wrong please help? Thank you.

    Read the article

  • Why does running rake gems:unpack result in a Gem::FilePermissionError

    - by Globalkeith
    I'm attempting to upgrade the friendly_id gem in a rails project. I have removed the old gem from the vendor directory, installed the new gem from rubygems.org. When I type: rake gems:unpack I get the following response: ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions into the /usr/lib/ruby/gems/1.8 directory. Sure, I realise I can sudo it, but what I don't understand is if I would like to unpack the gem into my project vender directory, why does it need access to /usr/lib/ruby/gems....

    Read the article

  • "rake test" doesn't load fixtures?

    - by Pavel K.
    when i run rake test --trace here's what happens ** Invoke test (first_time) ** Execute test ** Invoke test:units (first_time) ** Invoke db:test:prepare (first_time) ** Invoke db:abort_if_pending_migrations (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:abort_if_pending_migrations ** Execute db:test:prepare ** Invoke db:test:load (first_time) ** Invoke db:test:purge (first_time) ** Invoke environment ** Execute db:test:purge ** Execute db:test:load ** Invoke db:schema:load (first_time) ** Invoke environment ** Execute db:schema:load ** Execute test:units /usr/bin/ruby1.8 -I"lib:test".... (and after that fails because there's no fixtures loaded) why doesn't it load fixtures (i thought that would be default behaviour) and how do i make it load fixtures before executing tests??? p.s. my test/test_helper.rb content is: ENV["RAILS_ENV"] = "test" require File.expand_path(File.dirname(__FILE__) + "/../config/environment") require 'test_help' class ActiveSupport::TestCase self.use_transactional_fixtures = true self.use_instantiated_fixtures = false fixtures :all end (rails 2.3.4)

    Read the article

  • Rails 3 MySQL 2 reports an error in what looks to be valid SQL syntax

    - by John Judd
    I am trying to use the following bit of code to help in seeding my database. I need to add data continually over development and do not want to have to completely reseed data every time I add something new to the seeds.rb file. So I added the following function to insert the data if it doesn't already exist. def AddSetting(group, name, value, desc) Admin::Setting.create({group: group, name: name, value: value, description: desc}) unless Admin::Setting.find_by_sql("SELECT * FROM admin_settings WHERE group = '#{group}' AND name = '#{name}';").exists? end AddSetting('google', 'analytics_id', '', 'The ID of your Google Analytics account.') AddSetting('general', 'page_title', '', '') AddSetting('general', 'tag_line', '', '') This function is included in the db/seeds.rb file. Is this the right way to do this? However I am getting the following error when I try to run it through rake. rake aborted! Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group = 'google' AND name = 'analytics_id'' at line 1: SELECT * FROM admin_settings WHERE group = 'google' AND name = 'analytics_id'; Tasks: TOP => db:seed (See full trace by running task with --trace) Process finished with exit code 1 What is confusing me is that I am generating correct SQL as far as I can tell. In fact my code generates the SQL and I pass that to the find_by_sql function for the model, Rails itself can't be changing the SQL, or is it? SELECT * FROM admin_settings WHERE group = 'google' AND name = 'analytics_id'; I've written a lot of SQL over the years and I've looked through similar questions here. Maybe I've missed something, but I cannot see it.

    Read the article

  • rspec needs to be installed in base app

    - by Ryan Lanciaux
    I am having trouble building a gem. When I run rake it gives the the following error message: You need to install rspec in your base app I'm not completely certain what I should be doing to fix this. I have double checked that rspec is, in fact installed. Any help would be appreciated.

    Read the article

  • Is there any way to disable Erubis from printing "** Erubis 2.6.5" when starting the Rails environme

    - by Nathan
    I have several frequent Cron jobs that are run via Rake and the output of those jobs are e-mailed (via a MAILTO). Due to the fact that these tasks load the Rails environment (which includes Erubis) they always prints out "** Erubis 2.6.5" on startup. This means that an e-mail is always generated since Cron receives output. Is there any way to configure Erubis to cease printing this startup message to the console?

    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

  • Passing arguments to an Rspec SpecTask

    - by Bayard Randel
    Rake allows for the following syntax: task :my_task, :arg1, :arg2 do |t, args| puts "Args were: #{args}" end I'd like to be able to do the same, but with RSpecs SpecTask. The following unfortunately fails: desc "Run example with argument" SpecTask.new('my_task'), :datafile do |t, args| t.spec_files = FileList['cvd*_spec.rb -datafile=#{args}'] t.spec_opts = ["-c -f specdoc"] end Is it possible to achieve this with a SpecTask, or is there an alternative approach?

    Read the article

  • How can I generate a git diff of what's changed since the last time I pulled?

    - by Teflon Ted
    I'd like to script, preferably in rake, the following actions into a single command: Get the version of my local git repository. Git pull the latest code. Git diff from the version I extracted in step #1 to what is now in my local repository. In other words, I want to get the latest code form the central repository and immediately generate a diff of what's changed since the last time I pulled.

    Read the article

  • uninitialized constant MysqlCompat::MysqlRes (using mms2r gem)

    - by William
    Hi, moved a rails app of mine onto a new server and had to install a few gem dependencies. However, after installing the mysql gem I get the error, uninitialized constant MysqlCompat::MysqlRes, whenever I try to run a rake command that involves the mysql database. It seems I only get this error when I require the mms2r gem. Has anyone ever heard of this? I'm running mysql 2.8.1 gem.

    Read the article

  • What's the best way to generate an API reference document using a Rails routes.rb file?

    - by RNHurt
    I am trying to document the API for my Rails application and I can't help but wonder if there is a better way to generate an XML file based on my routes.rb file. I'm envisioning something similar to the output of rake routes but in a more friendly, XML type format. Corey has some interesting ideas about using reflection/introspection on the routes file here but it's not quite what I need. Please tell me this is a solved problem and I'm not the first one to think of this. :)

    Read the article

  • Rails OpenID Authentication Plugin No Longer Installs Rake Tasks?

    - by Rich Apodaca
    I'm following the Railscasts tutorial on using OpenID with AuthLogic. This command: $ script/plugin install git://github.com/rails/open_id_authentication.git installs the plugin, but I don't see any OpenID Rake tasks (rake -T). In particular, I can no longer run the task: $ rake open_id_authentication:db:create With previous applications, the Rake tasks were installed without a problem, so what's changed with the plugin? Which version of the plugin do I need to get the behavior I'm looking for? Using Rails 2.3.5.

    Read the article

  • How to call a Thor task multiple times?

    - by deepak
    Thor like Rake (and Make) has task management. If I call a task multiple times, it will effectively call the task only once. How can I call a task multiple times? I tried modifying the @_invocations hash, but that did not work: require 'csv' require './config/environment' class MisReport < Thor desc "all", "generate mysql and postgres mis" def all generate("pg_mis_report", "pg") generate("mysql_mis_report", "mysql") end desc "generate", "generate mis report" def generate(file_name = "mis_report_#{Time.now.to_s(:number)}", connection = "postgres") if connection == "pg" puts "== postgres database" ActiveRecord::Base.establish_connection :development_mysql else puts "== mysql database" ActiveRecord::Base.establish_connection :development end # generate MIS puts puts "mis file is at: #{file_path}" end end

    Read the article

  • Distribute CouchDB as part of a Rails app?

    - by AaronThomson
    I am working on a Rails project and the Architect has asked me to investigate bundling CouchDB into to application so that it can be deployed by Capistrano across multiple platforms and managed by Rake. My expectation was that I could set up the Erlang VM on the various environments and then distribute the CouchDB application with Capistrano. However I can't find any option to download CouchDB without the Erlang runtime. I can, however see an option to build CouchDB from source which I assume is platform dependent. I am new to Erlang and CouchBD, am I missing something? Is there a way to bundle CouchDB into a Rails app and distribute it across multiple platforms?

    Read the article

  • Rails and PostgreSQL: Role postgres does not exist

    - by Adam
    I have installed postgresql on my Mac OS Lion, and am working on a rails app. I use RVM to keep everything separate from my other rails apps. For some reason when I try to migrate the db for the first time rake cannot find the postgres user. I get the error FATAL: role "postgres" does not exist I have pgAdmin 3 so I can clearly see there is a postgres user in the DB - the admin account in fact - so I'm not sure what else to do. I read somewhere about people having issues with postgresql because of which path it was installed in, but then i don't think i would have gotten that far if it couldn't find the db. Any clues would be gratefully received! Thanks, Adam

    Read the article

  • Versioning CommonAssemblyInfo.cs and MSBuild

    - by James Thigpen
    So I have a CommonAssemblyInfo.cs linked into all the projects in my solution and is dynamically generated by my rake/albacore scripts which is not checked into source control. I also have a CommonAssemblyInfo.cs.local for use when there is no ruby available, mainly to be used by devs. Is it possible to have a msbuild task or something that runs before any of the other project compilation that will copy CommonAssemblyInfo.cs.local to CommonAssemblyInfo.cs before trying to compile my solution? I hate having to have a command you have to just know about and type in order to open and buidl the solution in Visual Studio.

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >