...not found", "Can't open file or directory", ...) after configuration changes, e.g. when changing MySQL's data directory. Remember to have a look at AppArmor's daemon configuration (usually at...
...because those times will also be converted using to_s(:db) and sent to MySQL. The database itself does not care about the (longer) value and just stores the date...
Bundler::GemRequireError: There was an error while trying to load the gem 'mysql2'. Gem Load Error is: Incorrect MySQL client library version! This gem was compiled for 5.5.46 but the...
...libmysqlclient.so.20: cannot open shared object file: No such file or directory": gem pristine mysql2 gem pristine re-installs a gem (without re-downloading), re-compiling all native extensions in...
...AJAX request completes before launching the debugger. A starved server thread can cause unexpected MySQL deadlocks. E.g. your test triggers a server request, locks some rows (MySQL automatically locks rows...
...starves the server thread. If you now run a query on the locked table, MySQL will explode with a detected deadlock. Again you need to wait_until the AJAX request...
See also PostgreSQL: Difference between text and varchar columns Text column sizes in MySQL
...rake db:migrate" on an empty # database, we swallow such errors. end end For MySQL, rescue Mysql2::Error, ActiveRecord::StatementInvalid might be fitting...
Tod is a gem for working with daytimes. That's a tuple of (hour, minute second) without a day, month...
...will make ActiveRecord join the notes and authors tables and the query will fail: Mysql::Error: Column 'created_at' in order clause is ambiguous Unless you have a test covering...
...id: Post.distinct_on_user.pluck(:user_id)).order(...) Further ressources There are some good examples on the MySql documentation to produce queries with the same result in the article 5.6.4 The Rows Holding...
Active Record's select method allows you to make use of the power of MySQL select statements. On the one hand it allows you to select specific fields. Post.select("content...
...allows you to include additional data in your models such as the results of MySQL functions. Those function resulst then are accessible like any other attribute of your model. Lets...
...versions (e.g. Ruby 2.1.8, Ruby 2.3.1). Test one codebase against multiple database types (currently MySQL or PostgreSQL). Compute a matrix of all possible dependency permutations (Ruby, gem set, database type...
...does not work with Ruby 2.1). Let developers enter their local credentials for MySQL and PostgreSQL in a database.yml file. Define default Ruby version, gem dependencies and database for developers...
We upgraded a Rails 2 application to Rails 3.2 and Ruby 2.1, changed the mysql adapter from mysql to mysql2, but did not activitate the asset pipeline. Instead we used...
...If necessary (i.e. the tests use databases), add a spec/support/database.github.yml file with this content: mysql: database: test username: root password: password host: 127.0.0.1 port: 3306 postgresql: database: test host: localhost...
...version that is actually in the matrix. You might run into issues with the mysql2 gem, including issues bundling, and even segfaults. Use this card to fix these issues.
...to you database and database table charsets to UTF8. You can check in the MySQL console with SHOW VARIABLES LIKE "character_set_database"; SHOW TABLE STATUS; Also update your nbsp...
...sudo gem install rails -v=2.3.12. You will also need Ubuntu development packages for MySQL, RMagick, etc. The bundle install call will otherwise fail for such projects...
...the Rails 2.3.8 gem." you forgot to bundle Rails. If you see "Missing the mysql gem", bundle that as well. Add both Gemfile as well as Gemfile.lock to the repository...
Open a MySQL root shell and use this command: PURGE BINARY LOGS BEFORE DATE(NOW() - INTERVAL 3 DAY) + INTERVAL 0 SECOND...
...NUMBER'] %> appended to the database name in the test section. # ./config/database.yml ... test: &TEST adapter: mysql database: my_database_name_test<%= ENV['TEST_ENV_NUMBER'] %> encoding: utf8 username: xxx password: yyy...
...actually never be written to the database, because we disconnected during an unfinished transaction. MySQL will for good reason not simply commit any open transactions when you disconnect (you might...
...as_geocodable using plain Graticule will just do the job. Support from the database MySQL 5 has spatial support. This involves custom data types and funny SQL syntax.
...pg_database ORDER by size_in_mb DESC; Want to see database sizes in MySQL...
...scope chain, it only mashes together strings that mostly happen to look like a MySQL query in the end. I don't generally advice against using scopes with JOINs. What...
Several Rails migration methods accept index: true as an option to create an index. In some cases (like #add_column...
...foreign keys. They are dumped to schema.rb as well. At this time, only the mysql, mysql2 and postgresql adapters support foreign keys. @rubyonrails Workings add_foreign_key(:comments, :users)