Methods
- A
- B
- C
- D
- E
- F
- G
- M
- N
- V
Class Public methods
exit_on_failure?()
Link
We want to exit on failure to be kind to other libraries This is only when accessing via CLI
new(*args)
Link
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 156 def initialize(*args) raise Error, "Options should be given after the application name. For details run: rails --help" if args[0].blank? super if !options[:skip_active_record] && !DATABASES.include?(options[:database]) raise Error, "Invalid value for --database option. Supported for preconfiguration are: #{DATABASES.join(", ")}." end end
Class Protected methods
Instance Public methods
create_active_record_files()
Link
create_app_files()
Link
create_boot_file()
Link
create_config_files()
Link
create_db_files()
Link
create_doc_files()
Link
create_lib_files()
Link
create_log_files()
Link
create_public_files()
Link
create_root_files()
Link
create_script_files()
Link
create_test_files()
Link
create_tmp_files()
Link
create_vendor_files()
Link
finish_template()
Link
Instance Protected methods
app_const()
Link
app_name()
Link
app_secret()
Link
camelized()
Link
defined_app_const_base?()
Link
defined_app_name()
Link
file(*args, &block)
Link
Define file as an alias to create_file for backwards compatibility.
get_builder_class()
Link
mysql_socket()
Link
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 284 def mysql_socket @mysql_socket ||= [ "/tmp/mysql.sock", # default "/var/run/mysqld/mysqld.sock", # debian/gentoo "/var/tmp/mysql.sock", # freebsd "/var/lib/mysql/mysql.sock", # fedora "/opt/local/lib/mysql/mysql.sock", # fedora "/opt/local/var/run/mysqld/mysqld.sock", # mac + darwinports + mysql "/opt/local/var/run/mysql4/mysqld.sock", # mac + darwinports + mysql4 "/opt/local/var/run/mysql5/mysqld.sock", # mac + darwinports + mysql5 "/opt/lampp/var/mysql/mysql.sock" # xampp for linux ].find { |f| File.exist?(f) } unless RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ end
valid_const?()
Link
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 270 def valid_const? if app_const =~ /^\d/ raise Error, "Invalid application name #{app_name}. Please give a name which does not start with numbers." elsif RESERVED_NAMES.include?(app_name) raise Error, "Invalid application name #{app_name}. Please give a name which does not match one of the reserved rails words." elsif Object.const_defined?(app_const_base) raise Error, "Invalid application name #{app_name}, constant #{app_const_base} is already in use. Please choose another application name." end end