Forum: Ruby on Rails Weird stylesheet_link_tag issue after moving servers

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Frank (Guest)
on 2006-03-19 00:22
(Received via mailing list)
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

  <link href="//stylesheets/styles.css" media="screen" rel="Stylesheet"
type="text/css" />

  Before the move it was generating the right code:

  <link href="/stylesheets/styles.css" media="screen" rel="Stylesheet"
type="text/css" />


  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
MySQL Blog: http://mysqldatabaseadministration.blogspot.com
Linux / Security Blog: http://frankmash.blogspot.com
Frank (Guest)
on 2006-03-19 00:35
(Received via mailing list)
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

  <script src="//javascripts/controls.js"
type="text/javascript"></script>

  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</a>


  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> 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

  <link href="//stylesheets/styles.css" media="screen" rel="Stylesheet"
type="text/css" />

  Before the move it was generating the right code:

  <link href="/stylesheets/styles.css" media="screen" rel="Stylesheet"
type="text/css" />


  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
MySQL Blog: 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



Rails Blog: http://railsruby.blogspot.com
MySQL Blog: http://mysqldatabaseadministration.blogspot.com
Linux / Security Blog: http://frankmash.blogspot.com
Emin H. (Guest)
on 2006-03-19 02:35
(Received via mailing list)
I might be wrong, but it may be worth checking production.rb for
asset_host
variable
Frank (Guest)
on 2006-03-19 06:07
(Received via mailing list)
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> 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

  <script src="//javascripts/controls.js"
type="text/javascript"></script>

    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</a>


  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> 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

  <link href="//stylesheets/styles.css" media="screen" rel="Stylesheet"
type="text/css" />

  Before the move it was generating the right code:

  <link href="/stylesheets/styles.css" media="screen" rel="Stylesheet"
type="text/css" />


  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
MySQL Blog:   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



Rails Blog: http://railsruby.blogspot.com
MySQL Blog:   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




  _______________________________________________
Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails



Rails Blog: http://railsruby.blogspot.com
MySQL Blog: http://mysqldatabaseadministration.blogspot.com
Linux / Security Blog: http://frankmash.blogspot.com
This topic is locked and can not be replied to.