문제

I'm new to Rails. I had created a Rails application earlier and also collected a few data records in the development database. Suppose, I create a new Rails application and I prefer to use the existing development database of the 1st Rails application in my newly created Rails application, how do I do that?

올바른 솔루션이 없습니다

다른 팁

Microsoft를 찾고 있습니다. 버그로 파일이 제출되었습니다.런타임 동안 런타임 동안 런타임 동안 런타임 중에 기본 인터페이스에서 메서드를 찾지 못합니다

your database.yml should look like this:

development:
  host: localhost
  adapter: mysql
  database: your_database_name [just the name, not the path]
  username: your_username
  password: your_password

test:
...

production:
...

You need to change the database name in the database.yml file. The seconnd problem you run into is migrations.

I would copy the migrations form your previous application over so that you maintain migration integrity with version numbers and rolling back if that is needed.

Also, if you are seeing development.locs - that locs refers to the table_name, which in restful context is usually also coincidentally the name of the controller.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top