# Weird stylesheet\_link\_tag issue after moving servers

**URL:** <https://www.ruby-forum.com/t/weird-stylesheet-link-tag-issue-after-moving-servers/55280>\
**Category:** Rails\
**Created:** [March 18, 2006, 11:22pm UTC](https://www.ruby-forum.com/t/weird-stylesheet-link-tag-issue-after-moving-servers/55280 "2006-03-18T23:22:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![frank](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3d9bf3/32.png) [@frank](https://www.ruby-forum.com/u/frank)\
**Post date:** [March 18, 2006, 11:22pm UTC](https://www.ruby-forum.com/t/weird-stylesheet-link-tag-issue-after-moving-servers/55280/1 "2006-03-18T23:22:54Z")

</div>

Dear experts,

I am in the process of switching servers for my application.

Before the move everything was working properly.

After the move

\<%= stylesheet\_link\_tag ‘/stylesheets/styles.css’ %\>

generates

Before the move it was generating the right code:

What could be causing this issue? Why is the extra “/” being added  
after the move? I have been searching everywhere for an answer but to  
no avail. Any ideas are appreciated.

Thanks  
Frank

Rails Blog: [http://railsruby.blogspot.com](http://railsruby.blogspot.com)  
MySQL Blog: [http://mysqldatabaseadministration.blogspot.com](http://mysqldatabaseadministration.blogspot.com)  
Linux / Security Blog: [http://frankmash.blogspot.com](http://frankmash.blogspot.com)

---

<div class="post-metadata">

**Author:** ![frank](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3d9bf3/32.png) [@frank](https://www.ruby-forum.com/u/frank)\
**Post date:** [March 18, 2006, 11:35pm UTC](https://www.ruby-forum.com/t/weird-stylesheet-link-tag-issue-after-moving-servers/55280/2 "2006-03-18T23:35:02Z")

</div>

I would also like to point out that this problem of extra slash being  
added is happening to many function calls including to  
javascript\_include\_tag calls:

\<%= javascript\_include\_tag “controls” %\>

which produces

and

link\_to\_remote calls:

which produces

```
      <a href="#" onclick="new Ajax.Updater('loginform', 

```

‘//member/signup’, {asynchronous:true, evalScripts:true,  
onComplete:function(request){Element.toggle($(‘loading’ ))},  
onLoading:function(request){Element.toggle($(‘loading’ ))}}); return  
false;"\>Sign up

Can anyone please show me light? I am very confused as to why the  
server change will trigger something like this.

I am using Ruby 1.8.4 and the stable version of rails.,

Any help is greatly appreciated.

Frank

Frank [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote: Dear experts,

I am in the process of switching servers for my application.

Before the move everything was working properly.

After the move

\<%= stylesheet\_link\_tag ‘/stylesheets/styles.css’ %\>

generates

Before the move it was generating the right code:

What could be causing this issue? Why is the extra “/” being added  
after the move? I have been searching everywhere for an answer but to  
no avail. Any ideas are appreciated.

Thanks  
Frank

Rails Blog: [http://railsruby.blogspot.com](http://railsruby.blogspot.com)  
MySQL Blog: [http://mysqldatabaseadministration.blogspot.com](http://mysqldatabaseadministration.blogspot.com)  
Linux / Security Blog:  
http://frankmash.blogspot.com\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
Rails mailing list  
removed\_email\_address@domain.invalid  
[http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

Rails Blog: [http://railsruby.blogspot.com](http://railsruby.blogspot.com)  
MySQL Blog: [http://mysqldatabaseadministration.blogspot.com](http://mysqldatabaseadministration.blogspot.com)  
Linux / Security Blog: [http://frankmash.blogspot.com](http://frankmash.blogspot.com)

---

<div class="post-metadata">

**Author:** ![frank](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3d9bf3/32.png) [@frank](https://www.ruby-forum.com/u/frank)\
**Post date:** [March 19, 2006, 1:35am UTC](https://www.ruby-forum.com/t/weird-stylesheet-link-tag-issue-after-moving-servers/55280/3 "2006-03-19T01:35:26Z")

</div>

I might be wrong, but it may be worth checking production.rb for  
asset\_host  
variable

---

<div class="post-metadata">

**Author:** ![frank](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3d9bf3/32.png) [@frank](https://www.ruby-forum.com/u/frank)\
**Post date:** [March 19, 2006, 5:07am UTC](https://www.ruby-forum.com/t/weird-stylesheet-link-tag-issue-after-moving-servers/55280/4 "2006-03-19T05:07:38Z")

</div>

Emin,  
Thank you for your reply.

I tried setting the asset\_host variable but the problem persists and  
all AJAX calls are adding an extra slash to the URLs.

I haven’t changed anything in the code since migrating to the new  
server.

I appreciate all the assistance very much.

Frank

Emin H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote: I might be wrong, but it may be  
worth checking production.rb for asset\_host variable

On 3/19/06, Frank \< removed\_email\_address@domain.invalid\> wrote:I would also  
like to point out that this problem of extra slash being added is  
happening to many function calls including to javascript\_include\_tag  
calls:

\<%= javascript\_include\_tag “controls” %\>

which produces

```
and

```

link\_to\_remote calls:

which produces

```
      <a href="#" onclick="new Ajax.Updater('loginform', 

```

‘//member/signup’, {asynchronous:true, evalScripts:true,  
onComplete:function(request){ Element.toggle($(‘loading’ ))},  
onLoading:function(request){Element.toggle($(‘loading’ ))}}); return  
false;"\>Sign up

Can anyone please show me light? I am very confused as to why the  
server change will trigger something like this.

I am using Ruby 1.8.4 and the stable version of rails.,

Any help is greatly appreciated.

```
Frank

```

Frank [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote: Dear experts,

I am in the process of switching servers for my application.

Before the move everything was working properly.

After the move

\<%= stylesheet\_link\_tag ‘/stylesheets/styles.css’ %\>

generates

Before the move it was generating the right code:

What could be causing this issue? Why is the extra “/” being added  
after the move? I have been searching everywhere for an answer but to  
no avail. Any ideas are appreciated.

Thanks  
Frank

Rails Blog: [http://railsruby.blogspot.com](http://railsruby.blogspot.com)  
MySQL Blog: [http://mysqldatabaseadministration.blogspot.com](http://mysqldatabaseadministration.blogspot.com)  
Linux / Security Blog:  
http://frankmash.blogspot.com\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
Rails mailing list  
removed\_email\_address@domain.invalid  
[http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

Rails Blog: [http://railsruby.blogspot.com](http://railsruby.blogspot.com)  
MySQL Blog: [http://mysqldatabaseadministration.blogspot.com](http://mysqldatabaseadministration.blogspot.com)  
Linux / Security Blog: [http://frankmash.blogspot.com](http://frankmash.blogspot.com)

* * *

Rails mailing list  
removed\_email\_address@domain.invalid  
[http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

* * *

Rails mailing list  
removed\_email\_address@domain.invalid  
[http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

Rails Blog: [http://railsruby.blogspot.com](http://railsruby.blogspot.com)  
MySQL Blog: [http://mysqldatabaseadministration.blogspot.com](http://mysqldatabaseadministration.blogspot.com)  
Linux / Security Blog: [http://frankmash.blogspot.com](http://frankmash.blogspot.com)
