mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix rake dev and related commands
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2653 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
50a02abd6d
commit
98c1735f03
3 changed files with 10 additions and 4 deletions
|
@ -1,5 +1,7 @@
|
|||
*SVN*
|
||||
|
||||
* Fix rake dev and related commands [Nicholas Seckar]
|
||||
|
||||
* The rails command tries to deduce your MySQL socket by running `mysql_config
|
||||
--socket`. If it fails, default to /path/to/your/mysql.sock
|
||||
|
||||
|
|
|
@ -156,7 +156,11 @@ task :copy_application do
|
|||
end
|
||||
|
||||
task :copy_configs do
|
||||
cp "configs/database.yml", "#{PKG_DESTINATION}/config/database.yml"
|
||||
app_name = "rails"
|
||||
socket = nil
|
||||
require 'erb'
|
||||
File.open("#{PKG_DESTINATION}/config/database.yml", 'w') {|f| f.write ERB.new(IO.read("configs/database.yml")).result(binding)}
|
||||
|
||||
cp "configs/routes.rb", "#{PKG_DESTINATION}/config/routes.rb"
|
||||
|
||||
cp "configs/apache.conf", "#{PKG_DESTINATION}/public/.htaccess"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
development:
|
||||
adapter: mysql
|
||||
database: <%= app_name %>_development
|
||||
socket: <%= socket %>
|
||||
<%= "socket: #{socket}" if socket %>
|
||||
username: root
|
||||
password:
|
||||
# With the MySQL adapter on localhost, it defaults to /tmp/mysql.sock
|
||||
|
@ -13,13 +13,13 @@ development:
|
|||
test:
|
||||
adapter: mysql
|
||||
database: <%= app_name %>_test
|
||||
socket: <%= socket %>
|
||||
<%= "socket: #{socket}" if socket %>
|
||||
username: root
|
||||
password:
|
||||
|
||||
production:
|
||||
adapter: mysql
|
||||
database: <%= app_name %>_production
|
||||
socket: <%= socket %>
|
||||
<%= "socket: #{socket}" if socket %>
|
||||
username: root
|
||||
password:
|
||||
|
|
Loading…
Reference in a new issue