Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8852975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:32:04+00:00 2026-06-14T13:32:04+00:00

I am currently using Rubymine for ruby on rails development. After enjoying the console

  • 0

I am currently using Rubymine for ruby on rails development.
After enjoying the console for testing purposes, I want to use the console instead of the build-in Rails Generator for creating new models and such.

But I can’t figure out how to use the rails console (Tools | Run Rails Console) for generating -lets say- a new model “user”.

rails generate model user name:string

gives me

NameError: undefined local variable or method `string’ for main:Object

I think I’m just missing something very basic here but I couldn’t come up with a solution by myself after several tries :/
I hope you can help me out.

Greets

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T13:32:06+00:00Added an answer on June 14, 2026 at 1:32 pm

    If you feel that you really must use the console to do this, you have a few options to get to the system.

    You can use backticks.

    or

    You can use system()

    Your command would then look like system("rails generate model user name:string") or it would look like `rails generate model user name:string`

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently using MySQL version 5.1.6 This is my first real world build and so
heres what I'm currently using: Rails -v 3.2.3 I'm trying to make a path
Im currently using vs2008 with asp.net mvc framework for web development. Im missing a
Im currently using codeigniter to build a messaging system and im trying to stay
Currently using SASS on a website build. It is my first project using it,
Currently using Chrome v19.0.1084.46 (Official Build 135956) beta-m jqGrid 4.3.2 (latest release) The problem
Im currently using base64_encode for some $_GET params that i don't want regular user
I am currently using the community edition of jasperReports Server 4.1.0 build 20110626_0015. basically,
I'm writing a program in Ruby for the first time (I'm using RubyMine as
currently using ruby-1.8.7-p302 [ i386 ] moving to ruby ruby-1.9.2-p0 [ i386 ] running

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.