0

Generate scaffolding is not working on my production code because of different gem versions on the production and local machine. So I have decided to do all the changes manually that are achieved using "generate scaffold" command.

Could some one please help me out what all changes needs to be done manually if am not using generate scaffolding.

example :

`rails generate scaffold Project title:string release_info:string file_or_folder_id:integer owner:string`
user2569524
  • 1,651
  • 7
  • 32
  • 57

1 Answers1

0

You should ALWAYS have the same gem versions in production as you do in development. Use Bundler for this with RVM or rbenv. This will allow you to have a specific gemset + ruby version for each project (and even branches within them)

Ben
  • 13,297
  • 4
  • 47
  • 68
  • I tried that . But was getting an error so thought I would better copy my controllers and models manually instead of generating them by scaffold.Right now I only scaffolding to be run on the production version, so dint bother much about gem versions. [link to my question](http://stackoverflow.com/questions/18513309/failed-to-build-gem-native-extension-ruby-racer-gem-of-different-version) – user2569524 Aug 29 '13 at 15:12
  • The answer in your other question should solve your problem. You basically have a newer version of v8 installed which throws this error since the method `include_path` isn't available. If you remove the newer version, ruby_racer will install a compatible version. – Ben Aug 31 '13 at 13:05