0

Hi guys i am currently still learning Ruby. Anyway i am on chapter 13 on web application development.I am stuck at this part for ruby script/generate Entry tittle:string content:text

Based on my research i have came across this link: Why does Ruby "script/generate" return "No such file or directory"?

Apparently i used Rails 3. so this is what happened.I located to my directory i run this command D:\RubyProjects/Part-3/Chapter-13/rails/mydiary> rails generate scaffold Entry title:string content:text

Now i got this error: Bundler could not find compatible version for gem "bundler Current Bundler version: 1.13.2 This Gemfile requires a different version of Bundler.

And i also tried to run this as well: install bundle, gem install bundle

Can anyone help me on this?

Community
  • 1
  • 1
Suresh
  • 39
  • 6

2 Answers2

0

You need to install bundler.

gem install bundler

and than

bundle install

after this you can generate scaffold

also look this

Community
  • 1
  • 1
Santosh Sharma
  • 2,114
  • 1
  • 17
  • 28
0

I tried another command like this: bundler exec rails g Entry Title:String content:text

Error appeared like this: Bundler could not find compatible versions for gem "bundler": In Gemfile: rails (= 3.0.1) x64-mingw32 was resolved to 3.0.1, which depends on bundler (~> 1.0.0) x64-mingw32

Current Bundler version: bundler (1.13.2) This Gemfile requires a different version of Bundler. Perhaps you need to update Bundler by running gem install bundler?

Could not find gem 'bundler (~> 1.0.0) x64-mingw32', which is required by gem 'rails (= 3.0.1) x64-mingw32', in any of the sources.

I tried to uninstall bundler version 1.13.2 and install bundler version 1.0.0. The same thing appear again. How do i set the default version for bundler?

Suresh
  • 39
  • 6