| View previous topic :: View next topic |
| Author |
Message |
swaminadhan
Joined: 14 Sep 2009 Posts: 73
|
Posted: Thu Feb 11, 2010 6:47 am Post subject: problem while upgrading the rails verion. |
|
|
Hello folks!
I am upgrading my rails application version from 1.2.3 to 2.3.4. In the process of upgrading i had changed the rhtml files to html.erb. And also i made changes in the environment.rb and boot.rb files according to the rails version 2.3.4. Here the problem is, while running the application in the upgraded rails version am getting the template missing error. It is searching for the views with rhtml file extension. but i need to use html.erb according to the rails version 2.3.4. Please kindly help me out with this.
Thanks in-advance,
swaminadhan. |
|
| Back to top |
|
 |
sharma I
Joined: 13 Jun 2008 Posts: 130
|
Posted: Thu Feb 11, 2010 12:55 pm Post subject: |
|
|
Hi,
In rails, each action in your controller maps to a view template. For this problem you need to check with your rails application by following the below two steps.
1) For example if you have template problem with method "login" in "users" controller then open up your config/routes.rb file and add the following to your users resource:
map.resources :users, :member => { :login => :get }
after adding this, restart your server once.
2) This is another way to resolve the template error problem by adding the line at end of your method.
for example:
def login
# some code
render :template => 'login'
end
I hope this can helps you... |
|
| Back to top |
|
 |
|