简体   繁体   中英

Downgrading Rails from 4 to 3.2 Console doesn't work

So I coded this website for a client in Rails 4 but since it was my first deployed rails app, I thought every hosting provider with rails would support Ruby 2 and Rails 4 but much to my dismay I tried but Dreamhost and Site5 who both use Passenger which requires Rails 3 and ruby 1.8 so I have to downgrade the whole site.

I was going along ok until I tried to check something using rails c, but it didnt work. It just gave the usage as if I was executing it from outside my app folder.

Any ideas how I make this work?

UPDATE

I think the issue is that rails cannot figure out that my app is a rails app since it gives the same message as if it's not. How do I reformate my rails 4 app to look like a 3.2 app?

Make sure you are using the right (the 3) version of Rails and if it is declared correctly in your Gemfile

After that, try running

bundle exec rails c

The reason rails console wasn't working is because when Rails 4 creates a new project there is no script/rails but there is when you create a Rails 3.2 project. I just created a dummy rails 3 application and copied script/rails into my root directory and it works fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM