This project is archived and is in readonly mode.
rake rails:update replaces application name
Reported by Pablo Borges | July 27th, 2010 @ 05:16 AM | in 3.0.2
Running 'rake rails:update' after updating to 3.0.0.rc will replace the application name in many config files (such as application.rb, environment.rb, development.rb, production.rb, test.rb) with 'Config'.
Comments and changes to this ticket
-
Rohit Arondekar July 27th, 2010 @ 06:53 AM
- Milestone cleared.
- State changed from new to open
- Assigned user set to José Valim
- Tag changed from rake tasks, 3.0.0.rc to rake tasks, 3.0.0.rc, generators
- Importance changed from to High
Confirmed that the issue exists.
I couldn't determine exactly why it's happening but this what I found —
I added some put statements in app_generator.rb
def app_name puts "destination_root is #{destination_root}" @app_name ||= File.basename(destination_root) end def app_const_base puts "app_name is #{app_name}" @app_const_base ||= app_name.gsub(/\W/, '_').squeeze('_').camelize end
Created a Rails 3 Beta 4 app, updated the Gemfile to use Rails 3 RC, switched to Rails 3 RC gemset (using RVM) and ran rake rails:update which gave the following output —
Note: I have separated out the important part with newlines and a comment.
(ruby-1.9.2@rails)(~/bugmash/beta4app)९ rake rails:update (in /home/rohit/bugmash/beta4app) destination_root is /home/rohit/bugmash/beta4app app_name is beta4app destination_root is /home/rohit/bugmash/beta4app Beta4app::Application identical config/boot.rb exist config ## Because destination root is ./config app name is also config! destination_root is /home/rohit/bugmash/beta4app/config app_name is config destination_root is /home/rohit/bugmash/beta4app/config conflict config/routes.rb Overwrite /home/rohit/bugmash/beta4app/config/routes.rb? (enter "h" for help) [Ynaqdh] a force config/routes.rb destination_root is /home/rohit/bugmash/beta4app/config app_name is config conflict config/application.rb force config/application.rb conflict config/environment.rb force config/environment.rb exist config/environments conflict config/environments/production.rb force config/environments/production.rb conflict config/environments/test.rb force config/environments/test.rb conflict config/environments/development.rb force config/environments/development.rb exist config/initializers identical config/initializers/backtrace_silencers.rb conflict config/initializers/secret_token.rb force config/initializers/secret_token.rb conflict config/initializers/inflections.rb force config/initializers/inflections.rb destination_root is /home/rohit/bugmash/beta4app/config conflict config/initializers/session_store.rb force config/initializers/session_store.rb identical config/initializers/mime_types.rb exist config/locales identical config/locales/en.yml exist public/javascripts identical public/javascripts/application.js identical public/javascripts/controls.js conflict public/javascripts/prototype.js force public/javascripts/prototype.js identical public/javascripts/dragdrop.js identical public/javascripts/effects.js conflict public/javascripts/rails.js force public/javascripts/rails.js exist script identical script/rails
I didn't know exactly how to proceed further but I did one last thing — I added a puts caller if app_name == 'config' in the app_const_base method and got the output —> http://pastie.org/1061691
I hope this helps somebody go further. Also I've given the issue a High priority since many people will be upgrading their beta apps to RC.
-
Repository July 27th, 2010 @ 10:35 AM
- State changed from open to committed
(from [5d3e8ee2bdd2225fe6e610c7e465bb69234871ed]) Fix app generator so that it uses the right app_name during rails:update rake task. [#5207 state:committed]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/5d3e8ee2bdd2225fe6e610c7e465bb... -
Uggbottes January 12th, 2011 @ 03:45 AM
LISA One of the most important supplies [url=http://www.bottes-ugg-bottes.com/bottes-ugg-classic-bottes-ugg-clas...] Bottes Ugg Mini Classic [/url]
that you must have is the bee suit. You need to wear this every time you will go near the bees because miu miu [url=http://www.bottes-ugg-bottes.com/bottes-ugg-classic-bottes-ugg-clas...] Classic Bottes Ugg [/url]
sale this will serve as your protection against their stings. This bee suit must be made of very special materials so that you will be sure that you chanel [ur l=http://www.bottes-ugg-bottes.com/bottes-ugg-button-bailey-bottes-ug...] Bottes Ugg Belgique [/url]are protected when you are doing [url=http://www.bottes-ugg-bottes.com/bottes-ugg-button-bailey-bottes-ug...] Bottes Ugg Australia [/url] -
Uggbottes January 12th, 2011 @ 05:55 AM
Bottes Ugg France Bottes Ugg Hiver could be the first shoes in the world to come with instructions on how to use them. Nike Air Jordan High Strap
Nike Air Jordan Retro High PremieNike Air Jordan Phatmost outlets provide specialist advice on walking properly. short rapid steps, landing on the heel or masai sensor
region before rolling towards the toe, is Tiffany Colliers TFNL839 Tiffany Heart Tag Pendant Tiffany Heart Tag Pendant Collier outlet the way forward. exercises include floating, Nouvelle Moncler StorePrintemps Nouvelle Moncler DoudouneAuthentique Bottes Monclera near jog closely resembling that slightly ridiculous gait employed by olympic walkers.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 5434 Small generator issue for generator in config/initializers/session_store.rb (Rails 3.0.0.rc2) This looks very similar to https://rails.lighthouseapp.co...
- 5207 rake rails:update replaces application name (from [5d3e8ee2bdd2225fe6e610c7e465bb69234871ed]) Fix app...
- 5273 config.ru not updated when upgrading from 3.0.0.beta4 to 3.0.0.rc It should actually remain MyApplication and not change to...